<filename>week1/classwork/ConditionalStatements.py
# Remember: INDENTATION AND COLONS ARE IMPORTANT

x = 5
if (x == 5):
  print("x is 5")

x = -3
if(x == 0):
  print("x is zero")
print("Hi there!")

x = 3
if(x < 5):
  pass

x = 5
if (x == 4):
  print("x is 4")
else:
  print("x is not 4")

x = 3
if(x == 5):
  print("x is 5")
elif(x == 4): # elif stands for "else if"
  print("x is 4")
else:
  print("x is neither 5 nor 4")

StarcoderdataPython