Q. Which of the following will raise a SyntaxError?

  • (A) if True print('Yes')
  • (B) if True: print('Yes')
  • (C) print('Yes')
  • (D) None of the above
πŸ’¬ Discuss
βœ… Correct Answer: (A) if True print('Yes')
Explanation: Python requires a colon `:` after `if` statements.
Explanation by: Mr. Dubey
Python requires a colon `:` after `if` statements.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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