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

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter1: Fundamentals Of C++ Programming
Section1.3: Preliminary Three: Software Development
Problem 7E: (Statistics) This is the formula for the standard normal deviate, z, used in statistical...
icon
Related questions
Question
Code the following problem in python. Follow requirements
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 3 images

Blurred answer
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
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage