KnowledgeBoat Logo
|

Informatics Practices

Identify the correct print() statement:

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

Getting Started

2 Likes

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").

Answered By

2 Likes


Related Questions