Computer Science, asked by aditya329t, 8 hours ago

write a python program which takes input from the user of how much money he/she has
and what he/she can purchase if the cost of all items are:-
shirt=500rs
blazer=800rs
trouser=1200rs

Answers

Answered by nikhilgupta060707
1

money = int(input("Enter your budget : "))

if money =< 0 or money < 500:

print("Sorry, you can't buy anything!")

elif money => 500 and money < 800:

print(" You can only buy a shirt (Rs. 500)")

elif money => 800:

print("You can buy a shirt (Rs. 500) or a blazer (Rs. 800)")

else:

print("print("You can buy a shirt (Rs. 500), a blazer (Rs. 800) or a trouser (Rs. 1200)")

Similar questions