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
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
Social Sciences,
1 month ago
Physics,
3 months ago
Math,
3 months ago
Math,
10 months ago
Sociology,
10 months ago