Computer Science, asked by lakshaya19265, 3 months ago

What will be the output if we write print(‘56+23’)
error or other answer

Answers

Answered by labdhee82
0

other answer

other answer

other answer

Answered by anindyaadhikari13
1

Answer:

  • The output of the given program will be - 5623.

Explanation:

  • The print() statement is used to display any message on the screen.
  • Here, '56' and '23' are considered as string. The + operator here acts as concatenation operator which concatenates both the string. So, on concatenating both the string, result = '5623'. Hence, the output is - 5623.
  • However, if we write - print(56 + 23) in place of print('56'+'23'), then the output will not be 5623. Now, 56 and 23 are considered as numbers. Their sum will be displayed now which is - 73.

Refer to the attachment.

Attachments:
Similar questions