πŸ“Š Python
Q. Which of the following statements will raise a `TypeError`?
  • (A) '2' + '3'
  • (B) 2 + 3
  • (C) '2' + 3
  • (D) int('2') + 3
πŸ’¬ Discuss
βœ… Correct Answer: (C) '2' + 3

Explanation: You cannot add a string and an integer directly; this raises a `TypeError`.

Explanation by: Mr. Dubey
You cannot add a string and an integer directly; this raises a `TypeError`.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
37
Total Visits
πŸ“½οΈ
8 mo ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
85%
Success Rate