1#a statement that checks if a condition is correct
2#example:
3x=5
4if x == 5:
5 print("x is 5")
6else:
7 print("x is not 5")
1a = 11
2b = 46
3
4if a < b:
5 print('a is less than b')
6else:
7 print('a is greater than b')
1number = 5
2if number == 5:
3 print("number equals 5")
4else:
5 print("number does not equal 5")
1x = int(input("number: ")) # get number from user
2
3if x < 0:
4 print(f"{x} is less than 0!") # if x is less than 0, print x is less than 0
5
6elif x == 0:
7 print(f"{x} is equal to 0!") # if x is equal to 0 then print x is equal to 0
8
9if x > 0:
10 print(f"{x} is more than 0!") # if x is greater than 0 print x is more than 0
11
12# yeah its me somewhatoriginal
1temperature = float(input('What is the temperature? '))
2 if temperature > 70:
3 print('Wear shorts.')
4 else:
5 print('Wear long pants.')
6 print('Get some exercise outside.')