I need help with the following code.
phone = input("What is the make of your Phone? ")
if phone == "Samsung":
model1 = input("Now can you tell me the model of your phone?")
if model1 < int(4):
print ("This model and any older models are not compatible with this system, Sorry for any inconvenience!")
else:
print ("Let us move on to the problem")
elif phone == "Apple":
model2 = input("Now can you tell me the model of your phone?")
if model1 < 4:
print("This model and any older models are not compatible with this system, Sorry for any inconvenience!")
else:
print("Let us move on to your problem")
Can you tell me how I would make it so that when you type in anything less than 4 it would say "Model not compatible" and when it is above 4 it will carry on with the code. Thank you
This is what happens when I type a number in
What is the make of your Phone? Samsung
Now can you tell me the model of your phone?3
Traceback (most recent call last):
File "\\shs-homes01\011275$\GCSE Computing\MY TroubleShooting code.py", line 9, in <module>
if model1 < int(4):
TypeError: unorderable types: str() < int()