top of page

Gravity timer Python code for all

Dec 10, 2021
1 min read

#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
Alu code

[11/09, 06:26] Harish Exinc: How nice if Harush had opened p4 laptop and shown abacus next and said it was more human? In 2000 with Janani [11/09, 07:22] Harish Exinc: Till now I was talking about a

 
 
 

Comments


bottom of page