Skip to content

Commit 93b2263

Browse files
Basic
1 parent e14bc1e commit 93b2263

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

racer.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# to calc prize benefits of a racer
2+
RD=int(input("Enter racing distance covered:"))
3+
4+
if RD>=1000:
5+
rate=2.5
6+
sup_prize=1250
7+
print("-----keep supliment of 5 KG")
8+
elif RD>=700:
9+
rate=2.0
10+
sup_prize=800
11+
print("-----keep supliment of 4 KG")
12+
elif RD>=400:
13+
rate=1.5
14+
sup_prize=450
15+
print("-----keep supliment of 3 KG")
16+
else:
17+
rate=1.0
18+
sup_prize=200
19+
print("-----keep supliment of 2 KG")
20+
cash=RD*rate
21+
print("cash prize: %0.2f Rs with health benefit of %d Rs"\
22+
%(cash,sup_prize))

0 commit comments

Comments
 (0)