Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

if else python

#if else loop in python

#simple example
age = int(input("What is your age: "))

if age < 18:
  print("You can't vote")
#if you enter your age less than 18 it will print you can't vote
  
else:
  print("you can vote")
  
#if you enter your age greater than 18 it will print you can vote 
 
PREVIOUS NEXT
Tagged: #python
ADD COMMENT
Topic
Name
9+6 =