Answer to Question #210190 in Electrical Engineering for mona

Question #210190

write a python program

In a supermarket, when paying your bill amount, if your amount exceeds RO.100, You have an option of Cash or Credit Card. If you pay as cash you will get 6% of discount from your original amount, but for Credit Card there is no discount. When your amount is less than RO.100 you will have to pay by cash only with the discount of 3%.


1
Expert's answer
2021-06-24T17:31:01-0400

CODE

bill_amount=float(input("Enter the bill amount : "))

if bill_amount>100:

cash=False

card=False

while True:

print("Choose the payment mode :")

print("1. Card\n2. Cash")

x=(input())

if(x=="1"):

card=True

break

elif (x=="2"):

cash=True;

break

else:

print("Please enter valid input")

print("Net discount = ",bill_amount*0.06)

else:

print("Net discount =", bill_amount*0.03)

OUTPUT1:

OUTPUT 2:



OUTPUT 3

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

Ask Your question

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS