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 = ½ gt² The variables in the formula are as follows: d is the distance in meters g is 9.8 (the gravitational constant) t is the amount of time in seconds the object has been falling Your program will calculate the distance in meters based on the object's falling distance. Modularity: Your program should contain 2 functions: main - will call the falling distance function in a loop, passing it the values 1-10 as arguments (seconds the object has been falling). It will display the returned distance. falling distance - will be passed one parameter which is the time in seconds the object has been falling and will calculate and return the distance in meters. falling distance should be stored in a separate file (module) called distance.py You will import distance before your main function in your original program file. Input Validation: None needed

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%

Please follow the instructions in addition to these

  • Variable names – use meaningful variable names such as total_taxes or num_cookies.
  • Function names – use meaningful verb names for functions such as display_taxes.
  • Named constants – Use named constants for all number values that will not be changed in the program such as RECIPE_SUGAR = 1.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 = ½ gt²
The variables in the formula are as follows:
d is the distance in meters
g is 9.8 (the gravitational constant)
t is the amount of time in seconds the object has been falling
Your program will calculate the distance in meters based on the object's falling distance.
Modularity: Your program should contain 2 functions:
main - will call the falling_distance function in a loop, passing it the values 1-10 as arguments
(seconds the object has been falling). It will display the returned distance.
falling distance - will be passed one parameter which is the time in seconds the object has been
falling and will calculate and return the distance in meters. falling distance should be stored in
a separate file (module) called distance.py You will import distance before your main
function in your original program file.
Input Validation: None needed
Transcribed Image Text: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 = ½ gt² The variables in the formula are as follows: d is the distance in meters g is 9.8 (the gravitational constant) t is the amount of time in seconds the object has been falling Your program will calculate the distance in meters based on the object's falling distance. Modularity: Your program should contain 2 functions: main - will call the falling_distance function in a loop, passing it the values 1-10 as arguments (seconds the object has been falling). It will display the returned distance. falling distance - will be passed one parameter which is the time in seconds the object has been falling and will calculate and return the distance in meters. falling distance should be stored in a separate file (module) called distance.py You will import distance before your main function in your original program file. Input Validation: None needed
Output: Should look like this:
Time Falling Distance
1
2
3
4
5
6
7
8
9
10
4.90
19.60
44.10
78.40
122.50
176.40
240.10
313.60
396.90
490.00
Transcribed Image Text:Output: Should look like this: Time Falling Distance 1 2 3 4 5 6 7 8 9 10 4.90 19.60 44.10 78.40 122.50 176.40 240.10 313.60 396.90 490.00
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

There should be two files or codes for this solution: the distance code and the second code fallingdistance

Solution
Bartleby Expert
SEE SOLUTION
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education