Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

use Python You will write a program that counts the size of a jackpot and also tells the user how many paper rolls they will

image text in transcribeduse Python

You will write a program that counts the size of a jackpot and also tells the user how many paper rolls they will need to deposit their jackpot in the bank. The program asks the user for the total number of quarters in their slot machine winnings. The program will then print the total amount in dollars and cents. To format a floating point amount in dollars and cents use this syntax: formatted = "${:.2f}".format(amount) This example creates a string stored in the variable formatted from the floating point value stored in amount. The string is only for output, do not do calculations on the string. Finally, your program will then use the // and % operators to figure out how many paper rolls of quarters will be filled and how many loose quarters will be left over. A paper roll holds 40 quarters. Output that result in a nicely formatted sentence. Here is a transcript of how your program should work. What the program prints is in blue and what the user types as input is in black. Enter number of quarters: 128 128 quarters is $32.00 You will fill 3 rolls and have 8 left over

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

Principles Of Multimedia Database Systems

Authors: V.S. Subrahmanian

1st Edition

1558604669, 978-1558604667

Students also viewed these Databases questions