Informatics Practices
Which of the following is syntactically correct text?
- "This is great!"
- 'she shouted 'HELLO' loudly'
- "Goodbye'
- "This "course" is good"
Getting Started
2 Likes
Answer
"This is great!"
Reason — The "This is great!" text uses double quotes (") to properly enclose the entire string. In Python, strings enclosed in either single quotes (') or double quotes (") are valid, but the entire string must be enclosed in the same type of quote. The other options have mismatched quotes, which cause syntax errors in Python.
Answered By
1 Like
Related Questions
Ctrl+Q shortcut key combination is used to exit Python.
Python was developed by …………… .
- Charles Babbage
- Guido van Rossum
- Tim Berners Lee
- Robert E. Kahn
Python language is …………… .
- Free
- Open Source
- Free and Open Source
- Proprietary
Identify the correct print() statement:
- print(Hello)
- print("Hello")
- print('Hello")
- print("Hello')