+ 1
How do you have the user input a number and have the program use a if/elif statement to print something?(python)
2 Antworten
+ 3
num = int(input())
if num == 5:
print("Number is 5")
elif num == 11:
print("Number is 11")
elif num == 7:
print("Number is 7")
else:
print("Number isn't 5, 11 or 7")
+ 1
thx