Purpose:
Now that I know you can open a Jupyter notebook and perform some basic tasks in both markdown and code cells it's time to get started using this tool to build physics and engineering models. There are two parts to this lab - the part that is aimed at your general learning and the part that is aimed at your personal physics project. In the first case I'm trying to introduce you so parts of the coding and commenting process. In the second case I'm trying to get you to apply the skills from the first part to your unique setting. I recognize that what I'm attempting to do here is basically to create a Coding Physics Models course/text at that's just crazy on many levels. On the other hand, my experience is that a lot of my best learning happens in this sort of environment. What you can do to help is notice what confuses you and ask questions all the time even if it seems ridiculous. Thanks in advance.....
Process:
We will start this exploration by going through much of the Toast2.0 notebook that you can download from the Jupyter files webpage. Ideally you will have already done so and are following along.
I strongly encourage you to take a few minutes and read this Jupyter notebook from the folks at the Space Telescope that articulates their best practices for creating effective and readable notebooks. I found it very enlightening. I have also linked it from the Jupyter Hints page.
I am asking you to do this first real coding effort using tools from PH211 that I hope you feel comfortable with. In particular you will be working with the kinematics of a kicked ball on a level playing field. Here are the tasks that you will complete for this lab:
I: Markdown Cell: Start by putting in appropriate titles with your name and lab description etc etc. Then show the kinematic equations that apply to an ideal physics ball flying through the air. Show, symbolically, how they lead to a calculation of how far the ball will go on a level field when kicked at some initial speed and initial angle.Describe what each term in your final equation represents.
II: Markdown Cell: Before each of the following code cells describe your understanding of what is happening in that cell as well as any learnings that happened during the creation of the notebook.
III: Code Cell: import any libraries that are useful for solving the equations that you have described above. This cell may well be adjusted as you complete the rest of the notebook and discover you need to access some command (cos and sin come to mind as well as possible polynomial solvers)
IV: Code Cell: Assign values to your initial variables and constants. Use readable variable names as we discussed in class. Use the print command to display(print out) those variables for the user to confirm.
V: Code Cell: "Code your algorithm" for determining the flight distance. "Code your algorithm" means to write the code the does the calculation you intend and assigns it to a useful output variable. Print out the result with units.
VI: Code Cell: Create code to calculate the location of the highest point of the arc and the total flight time for the ball. Go back and change your initial conditions until the peak height of the ball is 3.55 m.
VII: Code Cell: Copy some previous code cell. Create two errors in the code and run the cell. In the preceeding markdown cell describe what the error messages you get are telling you.You may find that you don't get two error messages - why? I want to see that you have had at least a first experience with error feedback.
- Project Deliverables:
1) Submit a pdf of your notebook that illustrates all of the tasks described above for a physics rock flying through the air.
2) Submit a proposal for your project. No doubt this document will be a pdf of a Jupyter notebook that doesn't need to include any code.
3) By next week Wednesday you need to have an appoved project (see the Project Criteria page)!