Write a python program to get change values in quater, dime, nickels and pennies. and calculate the values of change in dollars. consider Quater =0.25$ , Dime = 0.10$ , nickels = 0.05$, penny = 0.01$
print("Enter coins you have")
Quater = int(input("Quater :"))
Dime = int(input("Dime :"))
Nickels = int(input("Nickel :"))
Penny = int(input("Penny :"))
Total_Dollars = Quater * 0.25 + Dime * 0.10 + Nickels * 0.05 + Penny * 0.01
print(Total_Dollars)
"""
Output :
Enter coins you have
Quater :1
Dime :2
Nickel :3
Penny :4
0.6400000000000001
"""
Comments
Post a Comment