CBSE Class 11 Computer Science Question 28 of 80

Getting Started with Python — Question 5

Back to all questions
5
Question

Question 5

Identify the correct print() statement:

  1. print(Hello)
  2. print("Hello")
  3. print('Hello")
  4. print("Hello')
Answer

print("Hello")

Reason — In Python, when using the print() function, strings must be enclosed in matching pairs of either single (') or double quotes ("). Therefore, the correct statement is print("Hello").