1
Week 1: Introduction to Programming & Python
Setting up the development environment and first programs
Learning Objectives
By the end of this lesson, students will:
- Understand what programming is and why it's useful
- Install Python and set up their development environment
- Write and run their first Python programs
- Use print statements and comments effectively
Skills Developed:
- Problem-solving mindset
- Basic syntax understanding
- Development environment setup
Lesson Content
1 What is Programming? (15 minutes)
Discussion Points:
- • Programming is giving instructions to a computer
- • Examples of programs they use daily (apps, games, websites)
- • How programming relates to robotics and the miniAuto car
- • Why Python is a great first language
Instructor Notes:
Use analogies like recipes or giving directions to a friend. Emphasize that programming is about breaking down complex tasks into simple steps.
2 Setting Up Python - Choose Your Platform (20 minutes)
📱 iPhone/iPad - Pythonista 3
Cost: $9.99 (one-time)
Professional Python for iOS
- Open App Store
- Search "Pythonista 3"
- Purchase & install ($9.99)
- Open Pythonista 3
- Tap "+" to create new file
- Start coding!
Benefits: Offline coding, full Python 3, excellent UI
🤖 Android - Pydroid 3
Cost: Free (with ads)
Full Python IDE for Android
- Open Google Play Store
- Search "Pydroid 3"
- Install (free with ads)
- Open Pydroid 3
- Tap "+" to create new file
- Start coding!
Benefits: Free, offline coding, pip support, good performance
💻 PC/Mac - Traditional Setup
Cost: Free
Standard Python environment
- Go to python.org
- Download Python 3.11+
- Run installer (check "Add to PATH")
- Open Command Prompt/Terminal
- Type:
python --version
- Open IDLE or preferred editor
Benefits: Full development environment, extensive libraries
📚 Getting Started Tips:
Pythonista 3 (iPhone):
- • Tap "Examples" to see sample code
- • Use the play button ▶️ to run code
- • Swipe left on files to organize
- • Enable "Show Line Numbers" in settings
Pydroid 3 (Android):
- • Tap ▶️ (play) button to run code
- • Use "Terminal" tab for interactive Python
- • Long-press files for more options
- • Enable "Auto-save" in settings
PC/Mac Users:
- • IDLE is perfect for beginners
- • Press F5 to run your code
- • Save files with .py extension
- • If Python isn't recognized, check PATH
3 Your First Python Program (20 minutes)
Code to Type (Same for Both Platforms):
# This is a comment - it explains what the code does
print("Hello, World!")
print("Welcome to programming!")
# Try printing your name
print("My name is [Student Name]")
📱 Pythonista 3:
- Open Pythonista 3 app
- Tap "+" button (top right)
- Choose "Empty Script"
- Type the code above
- Tap ▶️ play button to run
- View output in console below
Tip: Tap and hold for cursor options
🤖 Pydroid 3:
- Open Pydroid 3 app
- Tap "+" button (bottom right)
- Choose "Python file"
- Type the code above
- Tap ▶️ yellow play button
- View output in terminal below
Tip: Use "Terminal" tab for interactive Python
💻 PC/Mac:
- Open IDLE (or Python editor)
- Create new file (Ctrl+N/Cmd+N)
- Type the code above
- Save file as "hello.py"
- Press F5 (or Run → Run Module)
- View output in Python Shell
Tip: Use Ctrl+S (Cmd+S) to save frequently
✅ Expected Output (Both Platforms):
Hello, World!
Welcome to programming!
My name is [Student Name]
Instructor Note: Have students personalize the last message with their actual names!
4 Understanding Print and Comments (15 minutes)
Key Concepts:
Print Function:
- • Displays text on screen
- • Text must be in quotes
- • Can print multiple items
- • Each print creates new line
Comments:
- • Start with # symbol
- • Ignored by computer
- • Explain what code does
- • Help others understand
# Multiple print examples
print("Line 1")
print("Line 2")
print("Math:", 2 + 3)
print("Multiple", "words", "here")
Hands-On Activity (20 minutes)
Project: Personal Introduction Program
Students will create a program that introduces themselves and shows their interest in robotics.
Requirements:
- • Print your name
- • Print your age or grade
- • Print one hobby or interest
- • Print why you're excited about programming
- • Include at least 3 comments explaining your code
- • Use at least 5 print statements
# Example solution
# Personal introduction program
print("Hello! Let me introduce myself.")
print("My name is Alex")
# Print my grade level
print("I am in 9th grade")
print("I love playing video games")
# Why I want to learn programming
print("I want to program robots to help people!")
print("Thanks for reading about me!")
Assessment & Homework
Quick Check (In Class):
- • Can student run Python successfully?
- • Do they understand print statements?
- • Are they using comments appropriately?
- • Can they modify and run code independently?
Homework Assignment:
Create a "Dream Robot" Program
Write a program that describes your dream robot. What would it do? How would it help people? Use at least 8 print statements and 5 comments.