Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Kindly use python programming. Please share code and picture of output as shown in the question instruction (to help with understanding) When an object begins

Kindly use python programming. Please share code and picture of output as shown in the question instruction image text in transcribed(to help with understanding)

When an object begins falling due to gravity, the distance the object falls in a given time t can be found as d=1/2gt2 where d is the distance in meters, g is the gravitational force, and t is the time in seconds. Write a function named falling_dist that accepts an object's falling time (in seconds) as an argument, and then calculates and returns the distance in meters that the object will fall during that time. Assume that the gravitational force is constant at 8.87m/s (mean surface gravity of Venus). Make sure to define this function outside of your main function. Then, inside of your main function, write a loop to iterate through time values from 5s to 50s in 5s increments. Inside this loop, call your falling_dist function to calculate the falling distance at each time. Finally, format the results as shown in the table below, using the data in Table 1 to verify that your program is working. Your output should exactly match the sample output, character for character, including all white space and punctuation. User input in the sample has been highlighted in Pappy's Purple to distinguish it from the program's output, but your user input does not need to be colored. Save your program as falling_login. py, where login is your Purdue login. Then submit it along with a screenshot showing a run of your program. Table 1: Falling distance test data

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Database Programming

Authors: Chris Fehily

1st Edition

1937842312, 978-1937842314

Students also viewed these Databases questions