DATA 420 — Modeling and Simulation — Spring 2024
Possible experience: +10XP (or even +15XP)
Due: Thu, Feb 1st, midnight
In this mini coding assignment, you'll play around with the numerical calculus code we did in class, and add a bit to it.
The file roadtrip.py contains the code we wrote in class, polished up a little. Assuming you cloned the class github repo for the previous assignment, you should be able to just type "git pull" and it will populate your directory with this file and any other recent changes. If you didn't, and you still don't want to do things the real-world way, you can again choose not to clone the repo and again do a copy/paste of the code to your machine.
After obtaining the file named roadtrip.py via any of the above strategies, make a copy of it named yourumwid_roadtrip.py. You can use a copy command, OS right-click operation, "Save as..." operation in your IDE, or any other way you can think of to make this copy. (Please do not name your copied file anything else. Please do not omit the suffix, or change the capitalization, or add/remove underscores, or do any other clever or creative things. Please call it exactly yourumwid_roadtrip.py, with your actual (lowercase) UMW Net ID substituted for "yourumwid". For instance, "jsmith19_roadtrip.py" is a correct name.)
You'll write all your code in the newly-created yourumwid_roadtrip.py file. The original roadtrip.py file can and should stay put.
Now, run your yourumwid_roadtrip.py file. (In an IDE, it might be a little green arrow button, or the F5 key. On the command line, it will be the command "python yourumwid_roadtrip.py".) Make sure you get a plot similar to the one I displayed in class:
Yours won't look exactly like this, of course, since you'll have generated different random driving speeds on line 12. But it should look somewhat like this.
You are now ready to begin thinking in earnest.
First, open a new text file (in vim, Notepad++, Spyder, Microsoft Word, or anything else) called "roadtrip_answers.md". You'll put all your written answers to the questions below in this file.
Now make the following additions/enhancements/changes to the simulation:
Send an email to data420submissions@gmail.com with subject line "DATA 420 numerical calculus practice turnin". Attached to this email should be your yourumwid_roadtrip.py file, your roadtrip_answers.md file, and all two (or three) of your plots.
Come to office hours, or send me email with subject line "DATA 420 numerical calculus help!!"