Skip to content

Commit 59d0649

Browse files
authored
Create momentum
1 parent 3cec98d commit 59d0649

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

momentum

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
Write a function named momentum() and calculate the momentum of cars before a collision if the mass and velocity of the cars are as follows:
2+
a. m = 1500, u = 80
3+
b. m = 2500, u = 130
4+
c. m = 1800, u = 100
5+
Given the formula to calculate momentum is 𝑝=𝑚𝑢. Name the Python file as momentum.py.
6+
7+
8+
9+
print('Momentum counter')
10+
print(' ')
11+
12+
print('p = mu')
13+
14+
print(' ')
15+
16+
m1 = (1500)
17+
u1 = (80)
18+
print('1) When m = 1500, u= 80, the momentum, p of this car is', m1*u1)
19+
20+
print(' ')
21+
22+
m2 = (2500)
23+
u2 = (130)
24+
print('2) When m = 2500, u = 130, the momentum, p of this car is', m2*u2)
25+
26+
print(' ')
27+
28+
m3 = (1800)
29+
u3 = (100)
30+
print('3) When m = 1800, u = 100, the momentum, p of this car is', m3*u3)

0 commit comments

Comments
 (0)