Estimated time
5-10 minutes
Level of difficulty
Very easy
Objectives
- Becoming familiar with the
print()function - Experimenting with Python code
Scenario
The print() command simply prints a line to the screen. Complete the 5 tasks below in order.
Tasks
Task 1 — Print
Hello, Python! using print() with double quotes3 pts
Task 2 — Use
print() to display your first name3 pts
Task 3 — Cause a
NameError by removing quotes from inside print()2 pts
Task 4 — Cause a
SyntaxError by removing parentheses from print2 pts
Task 5 — Write two
print() statements on separate lines using single quotes in at least one4 pts
main.py
1
Console
Ready. Click Run to execute your code.
AI Tutor
Powered by Claude
AI
Hi! Complete the 5 tasks on the left in order. Ask me anything!
What does print() do?
Why quotes?
SyntaxError?
NameError?
Single vs double quotes