PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# enter the size of the parachute in square meters and this program will show you the speed at different heights.
#Default jumping height is 100m. parachute opens at 50m above ground.
#I added a rudimentary graph
#m is the mass, A the surface of the body.
#A smaller dt will make calculations more accurate but time limit might be exceeded.
Area = float(input())
VV = []
HH = []
v,t,dt,h,A,c,H,m = 0,0,0.2, 100,1,0.8,50, 70
while h>0:
if h <= H:
A = Area
Flw = 0.5*1.3*c*A*v**2
Fr = m*9.8 - Flw
v += Fr/m*dt
h -= v*dt
VV.append(int(v))
print("h = {0}m --> v = {1}m/s".format(int(h), int(v)))
print("0 10 20 30")
for i in range(len(VV)):
if int(i)==i:
print(str(i) +"."*(VV[i]-2)+"*"+"."*(35-(VV[i])))
print("."+"."*(VV[i]-1)+"*"+"."*(35-(VV[i])))
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run