Skip to content

Latest commit

 

History

History
177 lines (129 loc) · 7.17 KB

File metadata and controls

177 lines (129 loc) · 7.17 KB

11th Grade Computer Science: Python Functions & GitHub Collaboration

Week-long Lesson Plan (Monday–Friday)

Overview

This week, students will learn how to write and use functions in Python. They will also learn to collaborate using GitHub by working in a shared public repository provided by the teacher. Each day builds foundational Python skills, emphasizes best practices, and promotes collaborative coding.


Table of Contents


Materials Needed

Material Where to Find / Notes
Computer with Internet School computer lab or personal device
GitHub Account Sign up here
Python 3 Interpreter Download here
Public GitHub Repo URL Provided by teacher (e.g., https://github.com/teacher/repo)
GitHub Docs GitHub Docs
Python Docs Python Functions

Illinois State CS Standards Addressed

Code Description
CS.3A.1 Decompose problems and create algorithms using sequences, selections, and iterations.
CS.3A.2 Write and modify code in a procedural programming language (Python).
CS.3A.3 Collaborate using version control systems (e.g., GitHub) for code development.
CS.3A.5 Test and debug programs, and document code appropriately.

Daily Lesson Plans

Monday

Date of Assignment: Monday

Instructions for Students

  1. Introduction to Functions

    • Read the Python Functions Tutorial.
    • Discuss the purpose of functions in programming.
    • Teacher demonstrates a simple function in Python.
  2. GitHub Setup

  3. First Python Function

    • In your cloned repo, create a file named first_function.py.
    • Write a function called greet() that prints "Hello, World!".
    • Commit your changes and push to your repo (How to Commit and Push).

Homework

  • Read about function arguments: Python Function Arguments.
  • Write a function named greet_name(name) that prints "Hello, <name>!" in your repo.

Materials Needed

  • Computer with Python and Git installed
  • GitHub account
  • URL of the class public repo

Tuesday

Date of Assignment: Tuesday

Instructions for Students

  1. Review Homework

    • Share and discuss solutions for greet_name(name).
  2. Function Parameters and Return Values

    • Teacher explains parameters and return values in functions.
    • Modify greet_name to return the greeting string instead of printing it.
  3. Collaboration on GitHub

    • Create a new branch in your fork called add-functions (Branching Guide).
    • Write a function add(a, b) that returns the sum of two numbers.
    • Commit and push the changes to your branch.

Homework

  • Write another function in your branch called subtract(a, b) that returns the difference.
  • Prepare a short (3-4 sentences) explanation of when to use the return statement.

Materials Needed

  • Access to yesterday’s files
  • GitHub repo (forked and cloned)
  • Internet connection

Wednesday

Date of Assignment: Wednesday

Instructions for Students

  1. Peer Review via Pull Requests

    • Read: About Pull Requests.
    • Open a pull request to submit your add-functions branch changes to the main branch of your fork.
    • Pair up with another student to review each other's code on GitHub (Reviewing PRs).
    • Leave at least one comment or suggestion.
  2. Function Scope

    • Teacher introduces the concept of variable scope within functions.

Homework

  • Write a function multiply(a, b) in your branch.
  • In your pull request, reply to your partner’s comment or suggestion.

Materials Needed

  • Access to GitHub and your fork
  • Peer partner assigned by teacher

Thursday

Date of Assignment: Thursday

Instructions for Students

  1. Merge Pull Requests

    • Teacher reviews how to merge pull requests (Merging PRs).
    • Merge your pull request after peer review is complete.
  2. Refactoring and Code Organization

    • Move all your functions into a new file called math_functions.py.
    • Add a docstring to each function (Python Docstrings).
  3. Testing Functions

    • Teacher introduces basic testing by writing a few test calls in a test_math_functions.py file.

Homework

  • Write a function divide(a, b) that returns the result of division.
  • Update your test file to test all four functions: add, subtract, multiply, divide.

Materials Needed

  • GitHub and your fork
  • Python interpreter

Friday

Date of Assignment: Friday

Instructions for Students

  1. Showcase & Reflection

    • Demonstrate your functions and tests to the class.
    • Reflect on what you learned about functions and using GitHub for collaboration.
  2. Documentation and Next Steps

    • Add a README.md file explaining how to use your functions.
    • Teacher summarizes best practices for writing and collaborating on code.

Homework

  • Finish any incomplete tasks from the week.
  • Prepare for a quiz on functions and basic GitHub workflow next week.

Materials Needed

  • Final versions of your code and tests
  • Class time for presentations