A

Admin • 802.91K Points
Coach

Q. What will be the output of the following code?

Code:
print('Hello' + str(5))
  • (A) Hello5
  • (B) Hello
  • (C) Error
  • (D) 5Hello
  • Correct Answer - Option(A)
  • Views: 6
  • Filed under category Python
  • Hashtags:

Explanation by: Admin
`str(5)` converts integer 5 to string, so concatenation results in 'Hello5'.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.