Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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
image text in transcribed

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

Recommended Textbook for

Put Your Data To Work 52 Tips And Techniques For Effectively Managing Your Database

Authors: Wes Trochlil

1st Edition

0880343079, 978-0880343077

More Books

Students also viewed these Databases questions

Question

Explain Coulomb's law with an example

Answered: 1 week ago

Question

What is operating system?

Answered: 1 week ago

Question

What is Ohm's law and also tell about Snell's law?

Answered: 1 week ago

Question

What is the Definition for Third Normal Form?

Answered: 1 week ago

Question

Provide two examples of a One-To-Many relationship.

Answered: 1 week ago