Computer Science, asked by parmar1332, 3 months ago

>>>print ('10'+'40') will give the output _______
a. 50
b. 1050
c. 1400
d. 1040 ​

Answers

Answered by anindyaadhikari13
1

Answer:

  • print('10'+'40') will give output - 1040 (option d is the right answer)

Explanation:

  • The print() statement in python is used to display a message on the screen.
  • Here, '10' and '40' are considered as string. The + operator concatenates both the string. After concatenation, the string becomes - '1040' which is displayed on the screen.
  • However, if print(10+40) was written instead of print('10'+'40'), then the output will be 50 as 10 and 50 are numbers which on adding gives result 50 which is displayed on the screen.

•••♪

Similar questions