Bird
0
0

The code below gives an error. What is the problem?

medium📝 Debug Q14 of 15
Python - Input and Output
The code below gives an error. What is the problem?
print('Hello' end='!')
AMissing comma between arguments
Bend parameter cannot be used
CQuotes are incorrect
Dprint() cannot print strings
Step-by-Step Solution
Solution:
  1. Step 1: Check syntax of print() arguments

    Arguments in print() must be separated by commas. Here, 'Hello' and end='!' are missing a comma.
  2. Step 2: Understand correct usage

    Correct syntax is print('Hello', end='!') with a comma separating the string and the keyword argument.
  3. Final Answer:

    Missing comma between arguments -> Option A
  4. Quick Check:

    Separate print args with commas [OK]
Quick Trick: Separate print arguments with commas [OK]
Common Mistakes:
MISTAKES
  • Forgetting commas between arguments
  • Thinking end is not allowed
  • Misplacing quotes

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Python Quizzes