Question: 1.1.1 Using a program as a calculator Our first program will evaluate (1.1) for a specific choice of v0,g, and t. Choosing v0=5m/s and g=9.81m/s2
1.1.1 Using a program as a calculator Our first program will evaluate (1.1) for a specific choice of v0,g, and t. Choosing v0=5m/s and g=9.81m/s2 makes the ball come back after t=2v0/g1s. This means that we are basically interested in the time interval [0,1]. Say we want to compute the height of the ball at time t=0.6s. From (1.1) we have y=50.6219.810.62 This arithmetic expression can be evaluated and its value can be printed by a very simple one-line Python program: print 50.60.59.810.62 The four standard arithmetic operators are written as +,,, and / in Python and most other computer languages. The exponentiation employs a double asterisk notation in Python, e.g., 0.62 is written as 0.62 Our task now is to create the program and run it, and this will be described next
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
