How do you have the user input a number and have the program use a if/elif statement to print something?(python) | SoloLearn: Learn to code for FREE!

+1

How do you have the user input a number and have the program use a if/elif statement to print something?(python)

9/30/2017 5:04:37 PM

Mr.BoopyDooper

2 Answers

New Answer

+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