WRITE A PYTHON PROGRAM TO CALCULATE THE TOTAL AMOUNT OF MONEY IN THE POCKET, GIVEN THE COINS OF RS.10 ,RS.5, RS.2, AND RS.1.

 

WRITE A PYTHON PROGRAM TO CALCULATE THE TOTAL AMOUNT OF MONEY IN THE POCKET, GIVEN THE COINS OF RS.10 ,RS.5, RS.2, AND RS.1.


PROGRAM:

r1=int(input("Enter the number of Rs.10 coins:"))
r2=int(input("Enter the number of Rs.5 coins:"))
r3=int(input("Enter the number of Rs.2 coins:"))
r4=int(input("Enter the number of Rs.1 coins:"))
t=((r1*10)+(r2*5)+(r3*2)+(r4*1))
print("Total amount of money in the pocket "+ "Rs.",t)

OUTPUT:

No comments:

Post a Comment




Copyright Ⓒ 2022 | Mechpedia | All Right Reserved.