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

  1. Open App Store
  2. Search "Pythonista 3"
  3. Purchase & install ($9.99)
  4. Open Pythonista 3
  5. Tap "+" to create new file
  6. Start coding!
Benefits: Offline coding, full Python 3, excellent UI

🤖 Android - Pydroid 3

Cost: Free (with ads)

Full Python IDE for Android

  1. Open Google Play Store
  2. Search "Pydroid 3"
  3. Install (free with ads)
  4. Open Pydroid 3
  5. Tap "+" to create new file
  6. Start coding!
Benefits: Free, offline coding, pip support, good performance

💻 PC/Mac - Traditional Setup

Cost: Free

Standard Python environment

  1. Go to python.org
  2. Download Python 3.11+
  3. Run installer (check "Add to PATH")
  4. Open Command Prompt/Terminal
  5. Type: python --version
  6. 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:

  1. Open Pythonista 3 app
  2. Tap "+" button (top right)
  3. Choose "Empty Script"
  4. Type the code above
  5. Tap ▶️ play button to run
  6. View output in console below
Tip: Tap and hold for cursor options

🤖 Pydroid 3:

  1. Open Pydroid 3 app
  2. Tap "+" button (bottom right)
  3. Choose "Python file"
  4. Type the code above
  5. Tap ▶️ yellow play button
  6. View output in terminal below
Tip: Use "Terminal" tab for interactive Python

💻 PC/Mac:

  1. Open IDLE (or Python editor)
  2. Create new file (Ctrl+N/Cmd+N)
  3. Type the code above
  4. Save file as "hello.py"
  5. Press F5 (or Run → Run Module)
  6. 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.

← Back to Overview 📝 Take Week 1 Quiz Next: Week 2 →