Question: LAB ACTIVITY 2 . 2 0 . 1 : convert _ pennies Write a program called convert _ pennies to input an integer value representing

LAB
ACTIVITY
2.20.1: convert_pennies
Write a program called "convert_pennies" to input an integer value representing a number of pennies and convert it to number of Dollars, Quarters, Dimes, Nickels and Pennies.
For example, when you run the program, it must first display the following prompt:
Enter the amount of pennies to convert:
When you enter 292 on the same line as the prompt, and press Enter, the program must display the following output:
292 pennies is equal to
2 one dollar bills
3 quarters
1 dimes
1 nickels
2 pennies
Have a nice day!
(1) Browser incompatibility detected, some instance functionality may not work as expected. See doc for more information
convert_pennies.py
Reset Lab
# Program name: convert_pennies.py (but,
main.py in zyBooks)
# Class: CSCI1301-Section xx, Term: xx
# Programmer: Marilyn Martinez
# Problem Description: Convert a number of pennies into its equivalent
# larger denominations.
# Input the number of pennies to convert
pennies = int (input ('Enter the amount of pennies to convert: '))
dollars = pennies ??100
pennies = pennies %100
quarters = pennies ??25 pennies = pennies %25 dimes = pennies ??10 pennies = pennies %10 nickles =
# Convert the amount into j+- an......7
 LAB ACTIVITY 2.20.1: convert_pennies Write a program called "convert_pennies" to input

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!