Question: Help me write a python code to x ( t ) = x 0 + v 0 t c o s 0 [ m ]

Help me write a python code to
x(t)=x0+v0tcos0[m]
y(t)=y0+v0tsin0+0.5gt2[m]
with the launch angle given in radians and time given in seconds. Assume x0=0m,y0=0m, and v0 is 12.5ms and note that the acceleration due to gravity (g) equals -9.81ms2. You can also assume that nothing will interfere with the motion of the projectile.
a. Ask the user to input the launch angle in radians. Use an explanatory prompt and assign the value of the launch angle to a variable named thetaO.
b. Assume that the user enters 4 as the launch angle, determine the values of x(t) and y(t) at time, t=0.0,0.1,0.2,0.3, and 0.4 sec using Python as a calculator). Round the values to 4 digits after the decimal point and list the values in a comment (or comments) in the Task 2 section of your Python file, .py. Make sure to explain the values in the comment(s).(See help elfun for help with rounding)
c. Define an array named t starting with 0 sec . and ending with 5 sec . with increments of 0.1 sec .
d. Using a for loop, calculate the position of the projectile for initial position and velocity values, as given above, and the user-specified launch angle (not 4).
Note that you can (and should) test your script and check your position values by entering a value of 4 as the launch angle and comparing the first five values to the values you determined in part b above, but the script should be written to handle any launch angle value the user inputs.
x(t)=x0+v0tcos0[m]
y(t)=y0+v0tsin0+0.5gt2[m]
with the launch angle given in radians and time given in seconds. Assume x0=0m,y0=0m, and v0 is 12.5ms and note that the acceleration due to gravity (g) equals -9.81ms2. You can also assume that nothing will interfere with the motion of the projectile.
a. Ask the user to input the launch angle in radians. Use an explanatory prompt and assign the value of the launch angle to a variable named thetaO.
b. Assume that the user enters 4 as the launch angle, determine the values of x(t) and y(t) at time, t=0.0,0.1,0.2,0.3, and 0.4 sec using Python as a calculator). Round the values to 4 digits after the decimal point and list the values in a comment (or comments) in the Task 2 section of your Python file, .py. Make sure to explain the values in the comment(s).(See help elfun for help with rounding)
c. Define an array named t starting with 0 sec . and ending with 5 sec . with increments of 0.1 sec .
d. Using a for loop, calculate the position of the projectile for initial position and velocity values, as given above, and the user-specified launch angle (not 4).
Note that you can (and should) test your script and check your position values by entering a value of 4 as the launch angle and comparing the first five values to the values you determined in part b above, but the script should be written to handle any launch angle value the user inputs.
Help me write a python code to x ( t ) = x 0 + v

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!