Write a python program that accepts a purchase amount as input and calculates a discount
of 10% if the customer purchases more than RS 20000 and display the output as “you have
to have (net amount)” (net amount = purchased amount - discount).
Answers
Answered by
3
Given below is your program::
pa = int(input("Enter purchase worth : "))
if pa > 20000:
nm = pa - ((10 / 100) * pa)
print("You have to have ", nm)
Logic::
==> pa contains the purchase worth.
==> Conditional statement is added which states if it is greater than 20000.
==> Then in nm, the formula is stored.
==> It is then printed on the screen using print function.
I hope that my answer helped you....
==>
Similar questions