Write a program to accept an amount from the user and prints the discount given along with the final amount to be paid. The program should give 5% discount if the amount entered is over 5000 otherwise no discount.
Answer:
Code:
amt=float(input(
"Enter amount to be paid: "
))
if (amt>
5000
):
print(
"You get a 5% discount"
)
amt_pay= amt-(
0.05
*amt)
print(
"Amount to be paid after discount: "
,amt_pay)
else:
print("Sorry, no discount applicable. Amount payable: ",amt)