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
Hiring linguistic working 20 year sweet spot

The hiring inexperience of indian scientists is Hi all maybe why I am not getting international engineering jobs is I never explained simple physics facts to a family in german or French so always fee

 
 
 
Love story at Taj mahal

[5/3, 10:27 AM] Harish Exinc: https://youtube.com/shorts/3-ByPsdFOpU?si=aTLkNLvmx9BwFzjm [5/3, 2:26 PM] Harish Exinc: Whats the use of buying christian sundial for me? I would have been happier with j

 
 
 

Comments


bottom of page