Question: Please mind the alterations as this is the main part confusing me. Also please explain answer. Reference Programming Exercise 5 on page 328. Write a


Please mind the alterations as this is the main part confusing me. Also please explain answer.
Reference Programming Exercise 5 on page 328. Write a pseudocode program for Programming Exercise 5. Let's use this opportunity to practice algorithm development. You will need to build the steps for accomplishing the exercise objective on your own. If you find yourself struggling, refer back to Designing Your First Program on page 68. Tip: use stepwise refinement to break down the problem into small steps. Your flowchart should have two parts: a main module and a function. Stepwise refinement has already begun; just break those two parts down further into smaller steps until each step represents a single pseudocode statement. Use one While loop. The fallingDistance() function should be called from inside the loop, but it should not perform input/output. Also, do not use global variables inside the function; use only local variables inside the function. In other words, limit the scope of variables as narrowly as possible--don't declare them in a module that you don't intend to use them. Hand trace your completed flowchart to ensure the results are what you'd expect. 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=2gt2 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. Design a function named fallingDistance that accepts an object's falling time (in seconds) as an argument. The function should return the distance, in meters, that the object has fallen during that time interval. Design a program that calls the function in a loop that passes the values 1 through 10 as arguments and displays the return value
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
