Solved

Write a Simple Python Program That Prompts the User for a Given

Question 128

Essay

Write a simple Python program that prompts the user for a given number of pennies, and displays the monetary value of the coins such that "xx cents" is displayed if the total number of pennies is less than 100, "x dollars and xx cents" is displayed if the number of pennies add up to dollars and cents, and "x dollars" is displayed if the pennies add up to whole dollars, with no leftover cents.

Correct Answer:

verifed

Verified

num_pennies = int(input('Enter the numbe...

View Answer

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions