Question

PYTHON HOMEWORK When an object is falling because of gravity, the following formula can be used...

PYTHON HOMEWORK

When an object is falling because of gravity, the following formula can be used ot determine the distance the object falls during a specific time period:
d=1/2 g t^2
The variables in the formula are as follows: d is the distance in meters(m), g is the acceleration due to gravity, an and its value is 9.8 m/s^2, t is the time duration in seconds(s).
Write a function named falling_distance() that accepts an object's falling duration(time) in seconds as an argument. The function ten prints the distance in meters, that the object has fallen during that time interval. Write a program (main) that prompts the user to enter time duration and then calls the function falling_distance() to print the object's falling distance.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

CODE

=============

def falling_distance(time):

distance = 0.5 * 9.8 * (time ^ 2)

print("Distance that the object has fallen during this time interval = %.2f meters" %distance)

def main():

time = int(input("Enter the time duration: "))

falling_distance(time)

if __name__ == "__main__":

main()

Add a comment
Know the answer?
Add Answer to:
PYTHON HOMEWORK When an object is falling because of gravity, the following formula can be used...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • write program in java 5. Falling Distance When an object is falling because of gravity, the...

    write program in java 5. Falling Distance When an object is falling because of gravity, the following formula can be used to determine the distance the object falls in a specific time period: d = 1/2 gta The variables in the formula are as follows: d is the distance in meters, g is 9.8, and t is the amount of time, in seconds, that the object has been falling. Write a method named fallingDistance that accepts an object's falling time...

  • When an object is falling because of gravity, the following formula can be used to determine...

    When an object is falling because of gravity, the following formula can be used to determine the distance the object falls in a specific time period: d=1/2 gt^2 The variables in the formula are as follows: d is the distance, g is 9.8, and t is the amount of time that the objects has been falling. Write a soldier method that accepts an object’s falling time as an argument. The method should return the distance that the object has fallen...

  • C++ LANGUAGE The following formula can be used to determine the distance an object falls in...

    C++ LANGUAGE The following formula can be used to determine the distance an object falls in a specific time period: d = 1 2 g t 2 where d is the distance in meters, g is 9.8, and t is the amount of time, in seconds, the object has been falling. Write a function named fallingDistance that accepts an object's falling time in seconds as an argument. You must define a named constant for g using a meaningful name and...

  • Do not prompt the user for input during the execution of your program. Do not pause...

    Do not prompt the user for input during the execution of your program. Do not pause at the end of the execution waiting for the user's input. Important notes: from now on, function prototypes should be written before the main function. And function definitions should be written after the main function. 10% will be deducted if this is not observed. Zybooks MODULES: MODULE 6 a.) (Lab4a.cpp) Chapter 6, “Falling Distance." The following formula can be used to determine the distance...

  • Java: Create a main method for your class, and then add another method to your class...

    Java: Create a main method for your class, and then add another method to your class (above the main method) named fallingDistance. This method accepts an integer into its parameter t, which is the amount of time, in seconds, that an object has been falling. This method returns the distance, in meters, that the object has fallen during the time interval. When an object s falling because of gravity, we use the following formula to determine the distance the object...

  • C++ Programming Windows Application Console Student Generated Problem Option 2.5 Option 2.5: Suppose Dave drops a...

    C++ Programming Windows Application Console Student Generated Problem Option 2.5 Option 2.5: Suppose Dave drops a watermelon off a high bridge and lets it fall until it hits the water. If we neglect air resistance, then the distance d in meters fallen by the watermelon after t seconds is d 0.5 g* t where the acceleration of gravity 9.8 meters/second?. Write a program that asks the user to input the number of seconds that the watermelon falls and the height...

  • ra Nat Formula Sheet Previous Quest Free fall means that an object is falling freely with...

    ra Nat Formula Sheet Previous Quest Free fall means that an object is falling freely with no forces acting upon it except gravity. The distance the object falls, or height, h, is half the product of gravity and the square of the time falling Which of the following represents the equation in terms of t? 3 4 5 6 8 9

  • Watermelon Problem: The answer should not include any whitespace. #include<iostream> using namespace std; int main() {...

    Watermelon Problem: The answer should not include any whitespace. #include<iostream> using namespace std; int main() {     double distance, gravity =9.8, height;     int time, t=0;     cout<<"Please input the time of fall in seconds:"<<endl;     [ A ] // Get the user input of the time of fall in seconds (Use cin>> method)     cout<<endl;     cout<<"Please input the height of the bridge in meters:"<<endl;     [ B ] // Get the user input of the height of the bridge in meters (Use cin>>...

  • how would i do this im matlab? im confused on the last two questions 3. [7...

    how would i do this im matlab? im confused on the last two questions 3. [7 points each) Find the distance traveled by a freely falling object on planets with different gravities. Consider the following two planets with different gravities, and use the time from 0 sec to 10 sec with a time increment of 1 sec from 0 to 10 sec. Planet Distance traveled: Gravity (m/s) 9.8 3.7 Earth Mars (1) Define a vector time that stores time values...

  • 6. [10 points) For the following question, to model the free fall of a falling rock,...

    6. [10 points) For the following question, to model the free fall of a falling rock, assume the usual idealizing simplifications for solving "free fall" problems. Work with the approximate value g = 9.8 m/s2 for the Earth's gravitational acceleration. Consider the following experiment. The Leaning Tower of Pisa is known worldwide for its nearly four- degree lean. The height of the tower is 55.86 meters from the ground on the low side, and 56.67 meters on the high side....

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT