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

Code:
print('Hello' + str(5))
  • (A) Hello5
  • (B) Hello
  • (C) Error
  • (D) 5Hello
πŸ’¬ Discuss
βœ… Correct Answer: (A) Hello5
Explanation: `str(5)` converts integer 5 to string, so concatenation results in 'Hello5'.
Explanation by: Mr. Dubey
`str(5)` converts integer 5 to string, so concatenation results in 'Hello5'.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
109
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
82%
Success Rate