How do I get for loop to print the equation for each value

Question:

How do I get for loop to print the equation for each value (1, 2, etc.) Instead of just the final value 10 times. How to print distance at every second.

enter image description here

Answers:

Replace t with seconds in your calculation of d.
As it is, you are calculating d t-times with t**2. As far as I understand, you want to calculate it t-times but print the distance after every second. So t has to be replaced with the variable you called seconds

And then either print in your function fallingDistance. Or call your function t-times and print the result in your main()

Answered By: bitflip
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.