Answer:
# main function is defined
def main():
# for loop to count 1 - 10
for t in range(1, 11):
# the distance is printed for each time 1 - 10. And the fallingDistance function is called with t as argument
print("Distance fall is: ", fallingDistance(t))
# the value of g is initialized to 9.8 as a constant
G = 9.8
# fallingDistance function is defined and it takes time as parameter. The distance is calculated inside the function. The calculated distance is returned when called.
def fallingDistance(time):
distance = (1 / 2) * G * (time ** 2)
return distance
# the call the program's main function to begin execution
if __name__ == "__main__":
main()
Explanation:
The program is written in Python and is well commented.
A sample image of program output during execution is attached.