Hi all, I have written a program with a function and I want to know if it all looks okay.
"Design a function that accepts an object's falling time (in seconds) as an argument. The function should return the distance in meters that the object falls [ distance = 1/2(gravity)(time^2) ]. Design a program that calls the function in a loop that passes the values 1 through 10 as arguments and displays the return value."
Question
bs819
Hi all, I have written a program with a function and I want to know if it all looks okay.
"Design a function that accepts an object's falling time (in seconds) as an argument. The function should return the distance in meters that the object falls [ distance = 1/2(gravity)(time^2) ]. Design a program that calls the function in a loop that passes the values 1 through 10 as arguments and displays the return value."
Link to comment
Share on other sites
7 answers to this question
Recommended Posts