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
World Languages,
1 month ago
Physics,
2 months ago
Math,
2 months ago
Math,
9 months ago
Sociology,
9 months ago