A

Admin • 828.03K Points
Coach

Q. Which of the following statements will raise a `TypeError`?

  • (A) '2' + '3'
  • (B) 2 + 3
  • (C) '2' + 3
  • (D) int('2') + 3
  • Correct Answer - Option(C)
  • Views: 9
  • Filed under category Python
  • Hashtags:

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

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.