Operators: What Does This Print
What does this print? · Beginner · about 6 min
Read each short program and type exactly what it prints, with each printed line on its own line.
Example
print(9 - 2 * 3)
prints
3Program 1
print(7 // 2, 7 % 2)
Program 2
print(-7 // 2, -7 % 2)
Program 3
print(2 ** 3 ** 2)
Program 4
print(2 + 3 * 4) print((2 + 3) * 4)
Program 5
print(1 < 5 < 3)
Program 6
print(5 == 5.0, "5" == 5)
Program 7
print(0 or "empty", 3 and 4)
Program 8
x = 10 x += 5 x //= 4 print(x)