top of page

Gravity timer Python code for all

#code to measure acceleration due to gravity by dropping a ball from head Can be done on phones too



import time

n=3

S=5.5*.3

for i in range(10):

a=input() #Press just before dropping after putting ball near head

start=time.time()

b=input() #Press random key just after it hits ground

stop=time.time()

falltime=stop-start

g= 2*S/falltime**2

print('h=5.5 ft Time = ',round(falltime,2),' s ' ,round(g,2), ' m/s^2')



'''


Can make apps, excel sheets etc


old Time = 0.3962876796722412 s g= 21.01322925251021


h=5.5 ft Time = 0.47 s 15.14 m/s^2 tennis ball


h=5.5 ft Time = 0.47 s 14.96 m/s^2 football


Next improvement is to add data analysis on 10 drops.


Will upload in Github as Gravitytimer.py hope to get 1 million follows


There are amazing projects like LIGO



https://github.com/harishravi121/Pythoncodes/blob/master/Gravitytimer3.py

'''




 
 
 

Recent Posts

See All
Troy eternal movie script authored by Harish!

[1/15, 6:38 PM] Harish Teaching: What if troy eternal became a movie.. [1/15, 6:44 PM] Harish Teaching: Forgot to make a video with it just pictures with first prototype.. [1/15, 6:46 PM] Harish Teach

 
 
 

Comments


bottom of page