Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a complete Python program to determine how much it will cost to purchase an unknown number of stamps purchased at the post office. a.

Write a complete Python program to determine how much it will cost to purchase an unknown number of stamps purchased at the post office.
a. One first class stamp currently costs 66 cents.
b. The program should contain a loop so that the program will run until the stamp quantity to be purchased is entered as a numeric 0 (zero).
c. The algorithm of the logic to be included is as follows for each iteration of the loop:
(1) Prompt the user for the customer name (you should enter your full name when running the program).
(2) Prompt the user to enter the desired number of stamps to be purchased for each loop iteration.
(3) Calculate the Cost = number of stamps * price per stamp
(4) Print the price per stamp
(5) Print the cost of all the stamps for that one purchase
d. When the final quantity of stamps to be purchased is entered as a numeric 0 (zero), the loop should end and then the total count of how many stamps were purchased all together from all of the purchases and the total dollar and cents amount of the total cost of all stamps purchased should be displayed based on formulas in the program logic.
e. The program should be executed only once with your name as the customer name. While the program is being executed, the following quantities of stamps should be entered during the loop processing: Inputs:
Customer name: (Your own full name)
Quantity of stamps to be purchased: 10
5
20
15
0

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

Database Management With Website Development Applications

Authors: Greg Riccardi

1st Edition

0201743876, 978-0201743876

More Books

Students also viewed these Databases questions

Question

Why could the Robert Bosch approach make sense to the company?

Answered: 1 week ago