Phase 1 🚀 — Getting Started
Topics: Hello World, REPL basics, print(), comments
Write your first Python programs. This phase is all about getting comfortable with the Python environment and the most fundamental building block: outputting text.
🔄 Exercise Flow
📚 Prerequisites
Before starting these exercises, make sure you've read:
- Python Overview — What is Python and why use it
- Python Syntax & Comments — How Python code is structured
- Variables & Data Types — Storing and using data
🔰 Starter: Hello, You!
Time: 10 minutes
Write a program that prints a personalised greeting.
Learning Objectives
- Use the
print()function with a string - Store a name in a variable and use it in output
- Write a single-line comment
Starter Code
# Starter: Hello, You!
# TODO: Create a variable called 'name' with your name
# TODO: Print "Hello, <name>! Welcome to Python."
# Your code here 👇
Expected Output
Hello, Alice! Welcome to Python.
⭐ Medium: ASCII Art Sign
Time: 15 minutes
Use multiple print() statements and comments to create an ASCII art sign for a shop.
Learning Objectives
- Chain multiple
print()calls - Use escape characters (
\n,\") inside strings - Add inline and multi-line comments
Starter Code
# Medium: ASCII Art Sign
# TODO: Print a shop sign using ASCII art.
# Requirements:
# - Top and bottom borders made of '='
# - The shop name centered in the middle
# - A tagline below the name
# - Use at least one multi-line comment explaining the design
# Your code here 👇
Expected Output
====================
= PYTHON CAFE =
= Code & Chill =
====================
🏆 Hard: Interactive Digital Business Card
Time: 25 minutes
Build a mini digital business card that uses variables, multiple print statements, and the REPL to display formatted information about a person or business.
Learning Objectives
- Combine variables, strings, and
print()in a meaningful program - Format output using f-strings
- Write clear, readable code with appropriate comments
- Run code in the REPL vs running a script
Starter Code
# Hard: Digital Business Card
# TODO: Create variables for:
# - name, role, company, email, phone, location
# TODO: Print a neatly formatted business card using f-strings
# TODO: The card should have a border and aligned text
# Starter variables
name = "Alex Johnson"
role = "Python Developer"
company = "TechStartup Inc."
phone = "+1-555-0123"
location = "San Francisco, CA"
# Your code here 👇
Expected Output
╔══════════════════════════════════════╗
║ ALEX JOHNSON ║
║ Python Developer ║
║ ║
║ Company: TechStartup Inc. ║
║ Email: [email protected] ║
║ Phone: +1-555-0123 ║
║ Location: San Francisco, CA ║
║ ║
║ "Code is like humor. When you ║
║ have to explain it, it's bad." ║
╚══════════════════════════════════════╝
💡 Tips for Success
- Open your terminal and type
python3to enter the REPL — test small snippets there. - Use
print()with multiple arguments:print("Hello", "World")adds a space automatically. - Comments start with
#— use them to plan your code before writing it. - If you see
SyntaxError: invalid syntax, check for missing quotes or parentheses.