Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A shop will give a discount of 1 0 % if the total cost of the purchase is more than $ 8 0 0 .

A shop will give a discount of 10% if the total cost of the purchase is more than $800. Each item in the store costs $100. Write a program to ask the user to enter the number of purchases, and print the total cost for the user. The program should only accept numeric inputs. For non-numeric inputs, display a message.
Input:
a) python C:\Users
eda\DataProgramming \M2\
assign2-5.py 7
Output:
a) No discount. Your total cost is $700.
b) You get a discount of $120, and your total cost is $1080.
c) Please enter a numeric input.
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

PostgreSQL Up And Running A Practical Guide To The Advanced Open Source Database

Authors: Regina Obe, Leo Hsu

3rd Edition

1491963417, 978-1491963418

More Books

Students also viewed these Databases questions

Question

What distinguishes a first-line manager from a team leader?

Answered: 1 week ago

Question

Draw and explain the operation of LVDT for pressure measurement

Answered: 1 week ago