Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

trying to translate a math formula into python

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 = ?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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))
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading