Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

# Input the number of cents cents = int ( input ( Enter the number of cents: ) ) # Calculate the coin

# Input the number of cents
cents = int(input("Enter the number of cents: "))
# Calculate the coin denomination
toonies = cents //200
cents %=200
loonies = cents //100
cents %=100
quarters = cents //25
cents %=25
dimes = cents //10
cents %=10
nickels = cents //5
cents %=5
pennies = cents
# Display the amount of change
print(f"{toonies} toonies")
print(f"{loonies} loonies")
print(f"{quarters} quarters")
print(f"{dimes} dimes")
print(f"{nickels} nickels")
print(f"{pennies} pennies")

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions