Computer Science, asked by unknown835083, 3 months ago

9) What will be the output of: i) print('2' + 2) ii) print('2'+'2') iii) print(2+2)
How does the 'P' operator behave differently in (ii) and (iii)?

Answers

Answered by abhishek181003
1

Answer:

1) 22

2) 22

3) 4

Explanation:

in 2) both the 2's are in inverted commas so they print as it is

in 3) they are not in inverted commas so they add and answer comes to be 4

Similar questions