Lab 5B-Value Returning Functions 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 I 1 4.90 19.60 44.10

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Code the following problem in python.
Input Validation: None needed
Output: Should look like this:
Time
Falling Distance
4.90
19.60
44.10
4
78.40
122.50
176.40
7
240.10
313.60
396.90
10
490.00
Programming Style Requirements.
Comments -Begin your program with a comment that includes: a) your name, b)
program status - either "Complete" or describe any incomplete or non-functioning
part of your program c)A 1-3 line description of what the program does.
Function comments - each function should begin with a comment explaining what
the function does
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. See section 2.9 on Named
Constants
Transcribed Image Text:Input Validation: None needed Output: Should look like this: Time Falling Distance 4.90 19.60 44.10 4 78.40 122.50 176.40 7 240.10 313.60 396.90 10 490.00 Programming Style Requirements. Comments -Begin your program with a comment that includes: a) your name, b) program status - either "Complete" or describe any incomplete or non-functioning part of your program c)A 1-3 line description of what the program does. Function comments - each function should begin with a comment explaining what the function does 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. See section 2.9 on Named Constants
Lab 5B -Value Returning Functions
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
4.90
2.
19.60
3.
44.10
Transcribed Image Text:Lab 5B -Value Returning Functions 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 4.90 2. 19.60 3. 44.10
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY