Informatics Practices
Identify the correct print() statement:
- print(Hello)
- print("Hello")
- print('Hello")
- print("Hello')
Getting Started
1 Like
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
1 Like
Related Questions
Which of the following is syntactically correct text?
- "This is great!"
- 'she shouted 'HELLO' loudly'
- "Goodbye'
- "This "course" is good"
Python language is …………… .
- Free
- Open Source
- Free and Open Source
- Proprietary
Which of the following is the shortcut key combination for exiting Python shell?
- F5
- Alt+F1
- Ctrl+E
- Ctrl+Q
The extension for a Python file is given as:
- .pt
- .pwy
- .py or .pyw
- .yppy