CBSE Class 11 Computer Science Question 138 of 173

Data Handling — Question 27

Back to all questions
27
Question

Question 18e

Find the errors(s)

print ("Hello" + 2)  
print ("Hello" + "2")
print ("Hello" * 2) 

Answer

The line print ("Hello" + 2) causes an error as addition operator (+) cannot concatenate a string and an int.

Answer