Bird
0
0

Which of the following is the correct way to print the words Hello and World separated by a space?

easy📝 Syntax Q12 of 15
Python - Input and Output
Which of the following is the correct way to print the words Hello and World separated by a space?
Aprint('Hello' 'World')
Bprint('Hello' + 'World')
Cprint('Hello', 'World')
Dprint('Hello'; 'World')
Step-by-Step Solution
Solution:
  1. Step 1: Understand how print separates items

    Using commas in print() separates items with spaces by default, so print('Hello', 'World') prints "Hello World".
  2. Step 2: Check other options

    print('Hello' 'World') joins strings without space; print('Hello' + 'World') concatenates without space; print('Hello'; 'World') uses invalid syntax.
  3. Final Answer:

    print('Hello', 'World') -> Option C
  4. Quick Check:

    Comma adds space in print() [OK]
Quick Trick: Use commas to print multiple items with spaces [OK]
Common Mistakes:
MISTAKES
  • Forgetting commas between items
  • Using semicolon inside print()
  • Concatenating without spaces

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Python Quizzes