Q. Which of the following will result in a syntax error?

  • (A) print('hello')
  • (B) if True print('yes')
  • (C) x = 1
  • (D) for i in range(5): pass
πŸ’¬ Discuss
βœ… Correct Answer: (B) if True print('yes')
Explanation: Python requires a colon after `if` conditions.
Explanation by: Mr. Dubey
Python requires a colon after `if` conditions.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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