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
Why I short sold my slr everytime

09, 08:03] Harish: [06/09, 07:51] Vprof. Harish: Thats why in the modern era a slr camera is best and once bought we must always buy ... [06/09, 07:56] Vprof. Harish: Because the zoom is calibrated wi

 
 
 
Elec to physics story now go back to elec desire

[03/09, 17:38] Harish Exinc: Put on roof enjoy inside with fitting https://www.amazon.in/hz/wishlist/ls/1HQ6OEFP576FH?ref_=wl_share This circuit for charging phones is risky as due to acceptance proto

 
 
 
2 abacus books to buy

[31/08, 04:59] Harish Exinc: Start reading it for free: https://read.amazon.in/kp/kshare?asin=B0HG5VGYSK&id=fwj5qjwncffm3mzacq6oszulv4 [31/08, Start reading it for free: https://read.amazon.in/kp/ksha

 
 
 

Comments


bottom of page