MCQs on Python Basic Operators

Python Basic Operators: Can You Ace This MCQ Test?

Think you know all there is to know about Python Basic Operators? Take this MCQ quiz and find out! From arithmetic to comparisons, put your knowledge to the test and see how you stack up.

1. What is the result of 5 + 2?

a) 7

b) 10

c) 3

d) 2.5

View Answer

Answer: a) 7

The + operator adds two numbers together.

2. What is the result of 8 - 3?

a) 5

b) 11

c) 24

d) 3

View Answer

Answer: a) 5

The - operator subtracts one number from another.

3. What is the result of 4 * 3?

a) 12

b) 1

c) 7

d) 0

View Answer

Answer: a) 12

The * operator multiplies two numbers together.

4. What is the result of 6 / 2?

a) 3

b) 12

c) 2.5

d) 0

View Answer

Answer: a) 3

The / operator divides one number by another.

5. What is the result of 9 % 2?

a) 1

b) 2

c) 0

d) 4.5

View Answer

Answer: a) 1

The % operator returns the remainder of a division.

6. What is the result of 3 ** 4?

a) 81

b) 12

c) 7

d) 0

View Answer

Answer: a) 81

The ** operator raises a number to a power.

7. What is the result of 5 // 2?

a)2

b) 2.5

c) 3

d) 4

View Answer

Answer: a) 2

The // operator performs integer division, which means it returns the floor of the division.

8. What is the result of 6 > 3?

a) True

b) False

View Answer

Answer: a) True

The > operator checks if the left operand is greater than the right operand.

9. What is the result of 4 == 4?

a) True

b) False

View Answer

Answer: a) True

The == operator checks if the left operand is equal to the right operand.

10. What is the result of 5 != 2?

a) True

b) False

View Answer

Answer: a) True

The != operator checks if the left operand is not equal to the right operand.

11. What is the result of 3 + 4?

a) 7

b) 12

c) -1

d) 1/3

View Answer

Answer: a) 7

The + operator adds the left operand to the right operand.

12. What is the result of 10 % 3?

a) 0

b) 1

c) 2

d) 3

View Answer

Answer: c) 2

The % operator returns the remainder of the division of the left operand by the right operand.

13. What is the result of 2 ** 3?

a) 2

b) 3

c) 6

d) 8

View Answer

Answer: d) 8

The ** operator raises the left operand to the power of the right operand.

14. What is the result of 5 < 2?

a) True

b) False

View Answer

Answer: b) False

The < operator checks if the left operand is less than the right operand.

15. What is the result of 8 >= 8?

a) True

b) False

View Answer

Answer: a) True

The >= operator checks if the left operand is greater than or equal to the right operand.

Popular posts from this blog

MCQs on Python Core Data Types

MCQs on Python Numeric Types