x = 99
if x > 99:
x += 1:
print(x)
99
20 % 4
0
Symbol used to raise one number to the power of another
** (exponent)
x = 10
if x < 10:
print(0)
elif x > 10:
print(1)
else:
print(2)
2
True and False
False
x = 1
if x < 1:
x -= 1
print(x)
1
25//6
4
Symbol used to get the remainder of a number
%
name = "Harry"
if "harry":
print("Like Harry Potter!")
else:
print("cool name")
cool name
Daily Double
not(not((True or False))) or not(True and False)
x = 3:
if 1 < x <= 3:
x *=2
print(x)
6
(3%2) * 2
2
Symbol used to increment a variable to its left by the value to its right
++
grade = 75
if grade > 70:
grade += 5
if grade > 80:
grade -=5
print(grade)
80
not(True) and True
False
y = 5
if 5 <= x < 9:
x -= 2
print(4)
4
(4**2) // (5%2)
16
Symbol used to divide the number to its left by the number to its right and round down
//
grade = 60
if grade > 50:
grade += 10
if grade > 70:
grade -=5
if grade >= 80:
print("B")
elif grade >= 70:
print("C")
else:
print("F")
C
not(False or False) and (not(False) and True)
True
y = 6.5
x = 4.5
if x >= 6 and y < 4.4:
print(x)
else:
print(y)
6.5
Daily Double
(27//8)**(20%9)
The library where you can find randint
random
grade = 60
if grade > 50:
grade += 10
if grade > 65:
grade -=5
if grade >= 80:
print("B")
elif grade >= 70:
print("C")
else:
print("F")
F
not(not(False) and (not(True)) or (True and not (False))
True