0% found this document useful (0 votes)
2 views10 pages

Arithmetic Operators in Python

The document provides an overview of arithmetic operators in Python, including addition, subtraction, multiplication, division, modulus, exponentiation, and floor division. It contains practice questions and multiple-choice questions to test understanding of these operators. Each question includes an answer and explanation to clarify the concepts.

Uploaded by

aungthihasoe
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views10 pages

Arithmetic Operators in Python

The document provides an overview of arithmetic operators in Python, including addition, subtraction, multiplication, division, modulus, exponentiation, and floor division. It contains practice questions and multiple-choice questions to test understanding of these operators. Each question includes an answer and explanation to clarify the concepts.

Uploaded by

aungthihasoe
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Arithmetic Operators in Python – Questions and Answers

1. What are arithmetic operators in Python?

Answer:
Arithmetic operators are used to perform mathematical calculations such as addition, subtraction,
multiplication, and division.

Common arithmetic operators in Python include:

Operator Meaning Example

+ Addition 5+3

- Subtraction 10 - 4

* Multiplication 6*2

/ Division 8/2

% Modulus (remainder) 9 % 4

** Exponent (power) 2 ** 3

// Floor Division 9 // 2

Practice Questions

Question 1

What is the output of the following Python code?

x = 10
y=5
print(x + y)

Answer:
15

Explanation:
10 + 5 = 15

Question 2
What will be printed?

a = 12
b=4
print(a - b)

Answer:
8

Explanation:
12 - 4 = 8

Question 3

What is the result of this code?

print(7 * 3)

Answer:
21

Explanation:
7 × 3 = 21

Question 4

What will the following code display?

print(20 / 5)

Answer:
4.0

Explanation:
Division in Python returns a float number.

Question 5

What is the output?

print(10 % 3)
Answer:
1

Explanation:
10 ÷ 3 = 3 remainder 1

Question 6

What is the output?

print(2 ** 4)

Answer:
16

Explanation:
2^4 = 2 × 2 × 2 × 2 = 16

Question 7

What will be the result?

print(15 // 4)

Answer:
3

Explanation:
Floor division removes the decimal part.

15 ÷ 4 = 3.75 → result becomes 3

Question 8

Write a Python program that adds two numbers entered by the user.

Answer:

num1 = int(input("Enter first number: "))


num2 = int(input("Enter second number: "))

result = num1 + num2


print("The sum is:", result)

Question 9

What will be the output?

print(5 + 2 * 3)

Answer:
11

Explanation:
Multiplication happens first.

2×3=6
5 + 6 = 11

Question 10

What will be printed?

x=9
y=2
print(x ** y)

Answer:
81

Explanation:
9² = 9 × 9 = 81

✅ Short Summary

Arithmetic operators in Python allow us to perform:

 Addition (+)

 Subtraction (-)

 Multiplication (*)

 Division (/)
 Modulus (%)

 Exponent (**)

 Floor division (//)

Python Arithmetic Operators – MCQ Questions

1. Which operator is used for addition in Python?

A. -
B. +
C. *
D. /

Answer: B

2. What is the output of the following code?

print(8 + 4)

A. 12
B. 32
C. 4
D. 2

Answer: A

3. Which operator is used for multiplication?

A. +
B. /
C. *
D. %

Answer: C

4. What is the output of this code?

print(15 - 7)
A. 8
B. 7
C. 22
D. 9

Answer: A

5. What does the % operator do in Python?

A. Division
B. Multiplication
C. Finds the remainder
D. Power calculation

Answer: C

6. What is the output?

print(10 % 4)

A. 2
B. 4
C. 6
D. 1

Answer: A

7. Which operator is used for exponentiation (power)?

A. ^
B. **
C. //
D. %

Answer: B

8. What is the output?

print(3 ** 3)
A. 9
B. 27
C. 6
D. 12

Answer: B

9. What is the output?

print(20 / 4)

A. 5
B. 5.0
C. 4
D. 80

Answer: B

Explanation: Division returns a float.

10. What does the // operator represent?

A. Normal division
B. Floor division
C. Modulus
D. Addition

Answer: B

11. What is the output?

print(17 // 5)

A. 3
B. 3.4
C. 2
D. 5

Answer: A
12. What is the output?

print(6 + 2 * 3)

A. 24
B. 12
C. 10
D. 18

Answer: B

Explanation: Multiplication happens first.

13. What is the output?

print((6 + 2) * 3)

A. 24
B. 12
C. 18
D. 10

Answer: A

14. What is the output?

print(9 % 2)

A. 1
B. 2
C. 3
D. 4

Answer: A

15. What is the output?

print(2 ** 5)

A. 10
B. 25
C. 32
D. 64

Answer: C

16. What is the output?

x = 10
y=3
print(x // y)

A. 3
B. 3.3
C. 1
D. 4

Answer: A

17. Which arithmetic operator gives the remainder of a division?

A. //
B. %
C. **
D. /

Answer: B

18. What is the output?

print(5 * 4 + 2)

A. 22
B. 20
C. 12
D. 18

Answer: A

19. What is the output?


print(12 / 5)

A. 2
B. 2.4
C. 3
D. 1

Answer: B

20. Which of the following is NOT an arithmetic operator in Python?

A. +
B. -
C. *
D. =

Answer: D

Explanation: = is an assignment operator, not arithmetic.

You might also like