I’m rather new to python I’m writing this program that calculates the falling time of a box using this simple formula:
h-0.5gT^2 = 0
h = 100
g = 9.8
T = ?
Where T is the time it takes (4.5 sec) On paper, I can easily solve for T but I’m not sure how to translate this into python I don’t know if there’s a formula that can give me the value of T with the inputs I already have or what
>Solution :
import math
T = math.sqrt(h / (0.5 * g))