Question: In the code below, if the user enters an input of 1 0 0 0 , what would be the output? if _ _ name

In the code below, if the user enters an input of 1000, what would be the output?
if __name__=="__main__":
cash = float(input("How much money do you have? "))
if cash >=2.0:
print("I can only buy the socks...")
elif cash >=15.0:
print("I can buy the shorts.")
elif cash >=25.0:
print("I can buy the shirt.")
elif cash >=100.0:
print("I can buy the jacket.")
elif cash >=500.0:
print("I can buy anything!")
else:
print("I cannot buy anything...")

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!