Important Python Mcqs

What arithmetic operators cannot be used with strings?

a) +

b) *

c) –

d) All of the mentioned

Answer:

c) –

Explanation:

Arithmetic operators are, operators which are used to perform arithmetic operations which mainly includes addition(+), multiplication(*), subtraction(-) and division(/). We can use all these operators with any numerical values to perform calculations.

But we cannot use all these operators with strings in python. We can only use selected arithmetic operators on strings. We can concatenate two strings with the help of the addition symbol (+). Similarly, multiplication(*) is used to multiply strings. Thus, option C is correct.

Related MCQs
Aniket Malik

Aniket Malik

CERTIFIED TUTOR/TRAINER WITH 300+ REVIEWS

Facing difficulty with

this concept?