Computer Science, asked by Crazyki3656T, 2 months ago

Write a program in BlueJ to find to accept the Cost Price of a mobile phone and find the Sell Price after giving discount as follows:
Price Discount%
Upto 10000 5
>10000 to 15000 10
>15000 to 20000 15
>20000 to 25000 20
>25000 to 45000 30
>45000 35
Print the Discount and the Sell Price.​

Answers

Answered by NITeSh1881
1

Answer:

cp=int(input("enter the cp"))

discount=0

sp=0

if cp<=10000:

discount=discount+(5/100*cp)

sp=cp-sp

elif (cp>10000)and(cp>=15000):

discount=discount+(10/100*cp)

sp=cp-sp

elif (cp>15000)and(cp<=20000):

discount=discount+(15/100*cp)

sp=cp-sp

elif (cp>20000)and(cp<=25000):

discount=discount+(20/100*cp)

sp=cp-sp

elif (cp>25000)and(cp<=45000):

discount=discount+(30/100*cp)

sp=cp-sp

else:

discount=discount+(35/100*cp)

sp=cp-sp

print("discount=", discount ,"sp=", sp)

Similar questions