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.




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)


    print("Sorry, no discount applicable. Amount payable: ",amt)


Long Question 6 - Teachoo.jpg

Go Ad-free
Davneet Singh's photo - Co-founder, Teachoo

Made by

Davneet Singh

Davneet Singh has done his B.Tech from Indian Institute of Technology, Kanpur. He has been teaching from the past 14 years. He provides courses for Maths, Science, Social Science, Physics, Chemistry, Computer Science at Teachoo.