Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

if statement python

number = int(input("Enter a number from 1 to 3"))
# make the user write a random number from 1 to 3
if number == 1:
  print("You choose number 1")
elif number == 2:
  print("You choose number 2")
else:
    print("You choose number 3")

  
Source by python-course.eu #
 
PREVIOUS NEXT
Tagged: #statement #python
ADD COMMENT
Topic
Name
9+8 =