Python Multiple Choice Questions (Test 1)

Python Multiple Choice Questions (Test 1)

1 / 20

What will be the output after the following statements?
x = 5
y = 7
x *= y
print(x)

2 / 20

What will be the output after the following statements?

x = 3
y = 2
x += y
print(x)

3 / 20

What will be the output after the following statements?
x = 15 + 35
print(x)

4 / 20

What will be the output after the following statements?
x = ’24’ + ’16’
print(x)

5 / 20

What will be the output after the following statements?
x = 7 * (4 + 5)
print(x)

6 / 20

What will be the output after the following statements?
x = 2 * 4 + 7
print(x)

7 / 20

What will be the output after the following statements?
x = 46
y = 98
z = y if (y % 2 == 0) else x
print(z)

8 / 20

What will be the output after the following statements?
x = 65
y = 53
z = y if (x % 2 == 0) else x
print(z)

9 / 20

What will be the output after the following statements?
x = 50
y = 10
z = y if (y > x) else x
print(z)

10 / 20

What will be the output after the following statements?
x = 20
y = 40
z = y if (y > x) else x
print(z)

11 / 20

What will be the output after the following statements?
x = True
y = False
print(not y)

12 / 20

What will be the output after the following statements?
x = True
y = False
print(not x)

13 / 20

What will be the output after the following statements?
x = True
y = False
print(x or y)

14 / 20

What will be the output after the following statements?
x = True
y = False
print(x and y)

15 / 20

What will be the output after the following statements?
x = 72
y = 64
print(x < y)

16 / 20

What will be the output after the following statements?
x = 83
y = 57
print(x > y)

17 / 20

What will be the output after the following statements?
x = 8
y = 6
print(x != y)

18 / 20

What will be the output after the following statements?
x = 3
y = 7
print(x == y)

19 / 20

What will be the output after the following statements?
x = 30
y = 7
x %= y
print(x)

20 / 20

What will be the output after the following statements?
x = 25
y = 15
x -= y
print(x)

Your score is

The average score is 0%

0%

Leave a Comment