Question: Hi! Can you please help me with the following PYTHON PROGRAMMING TASK. There are already similar answers but the criteria for this one is a
Hi! Can you please help me with the following PYTHON PROGRAMMING TASK. There are already similar answers but the criteria for this one is a little change so please try to read the requirments. Thanks
Write a PYTHON program that will compute the distance (D) an object falls in a specific amount of time (t) using the formula
D = 1/2 gt2
The user must input the amount of time the object falls (t, measured in sec.) and the gravity (g, measured in m/sec2 ). The values of t and g must satisfy the following criteria: 0 t 45, 0.1 g 10.2. Your program should run as follows. The user input for t and g should be via the function named inputValues. The input validation must happen inside this function. The function named calculateDistance should be calculating the value of D. The function named displayResults should be displaying the values of t, g and D.
You cannot use global variables in your program.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
