Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Geekware Software Company s biggest seller software package sells for $ 1 4 9 each. Quantity discounts are given according to the following table: Quantity

Geekware Software Companys biggest seller software package sells for $149 each. Quantity discounts are given according to the following table:
Quantity Discount
1-9 None
10-4910%
50-9920%
100-14930%
150 or more 40%
Goal:
Write a program that asks the user to enter the number of packages purchased. If the number entered is valid (not negative and not zero), the program should then display the dollar amount of the discount (if any) and the total amount of the purchase after discount.
Design:
You will be using a flow chart to design your program.
Input Validation:
The number of packages entered by the user must not be negative or zero. If the user inputs a fractional number, the code should convert it to a whole number.
Output and Sample Dialog:
If an invalid number of packages is entered, the message Invalid
number of packages! must be shown and the program should terminate. Otherwise, your program
should use F-strings to produce correctly labeled output with dollar
amounts rounded to two decimal places and dollar signs displayed
Enter the number of packages purchased: 53
Discount amount: $1,579.40
Total after discount: $6,317.60
Requirements:
Use named constants for all number values that will not be changed in the program
Use F-strings
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

From Herds To Insights Harnessing Data Analytics For Sustainable Livestock Farming

Authors: Prof Suresh Neethirajan

1st Edition

B0CFD6K6KK, 979-8857075487

More Books

Students also viewed these Databases questions

Question

Identify psychologys main subfields.

Answered: 1 week ago