[Tutor] Inputting variables into functions containing if, elif, else.

Jack Simpson simpsonrmz41 at gmail.com
Mon Jun 26 07:11:26 EDT 2023


Hi,

I was hoping to gain some knowledge on how I can test out a function.
Should I have used the return function somewhere or have I totally missed a
step?
Or have I not defined a variable properly?

number = 25


if number <= 5:
   print("The number is 5 or smaller.")
elif number == 33:
   print("The number is 33.")
elif number < 32 and number >= 6:
   print("The number is less than 32 and greater than 6.")
else:
   print("The number is " + str(number))


More information about the Tutor mailing list