Course Title: Python 3

Curriculum Description: This ten-lesson module follows Python 2 and introduces advanced concepts in Python programming.

Prerequisites: Python 1 and Python 2

Course Content:

In this course, students will complete a series of lessons that introduce advanced Python concepts and expand on material learned in previous lessons. Topics include functional programming, compound conditionals, importing modules, dictionaries, error handling.

 

Assessment Tools:

  • Auto graded lessons
  • Multiple Choice - Formative Assessments
  • Project work graded by rubric

Standards addressed in all lessons:

Each lesson includes components that address these standards. 

 

Skill Building:

  • CSTA 2-AP-11: Create clearly named variables that represent different data types and perform operations on their values.

  • CSTA 2-AP-13: Decompose problems and subproblems into parts to facilitate the design, implementation, and review of programs.

 

Debugging:

  • CSTA 2-AP-17: Systematically test and refine programs using a range of test cases.
 

Create Projects:

  • CSTA 2-AP-15: Seek and incorporate feedback from team members and users to refine a solution that meets user needs.

Student Activities: How is learning demonstrated?

Lessons are based on a differentiated instruction model with multiple exit points:

 

Skill Build – Learn new concepts to create a project following a step-by-step approach.

Modify – Apply learned concepts to modify and add to the existing project.

Create – Show mastery by building a real-world relevant project on their own or as part of a team.

Lesson 1 - Arcade Game

 

Build a simple game with keyboard controls and code organized under separate functions.

 

Create Project: Design a maze for the user to navigate.

Standards:

 

2-AP-11: Use Variables

 

2-AP-14: Functions

 

2-AP-19: Comments and Documentation

Learning Targets:

  • Organize a program as a series of functions called in the main function

  • Use defualt values and parameters for functions

  • Add docstrings to describe what each function does

 

 

Lesson 2 - Animal Classifier

 

Use if statements and logical operators to classify a vertebrate.

 

Create Project: Using a truth table, make a program that employs logic to determine a user's type (e.g. superhero, dog, etc.).

Standards:

 

2-AP-11: Use Variables

 

2-AP-12: Control Structures

 

2-AP-14: Functions

Learning Targets:

  • Use booleans

  • Use and, or, and not operators in if statements

  • Use the is operator in if statements

Lesson 3 - Time of Day

 

Determine a future time of day after adding time to the current time by importing the datetime module.

 

Create Project: Calculate how long the user has been alive using functions inside the datetime module.

Standards:

 

2-AP-11: Use Variables


2-AP-14: Functions

 

2-AP-16: Reuse and Attribute

 

2-AP-19: Comments and Documentation

Learning Targets:

  • Import Python modules

  • Use module tools to add functionality to programs

  • Use the Datetime module to examine datetime information and produce new datetime information

Lesson 4 - Grade Calculator

 

Use list commands to store, manipulate, and make calculations with grades and display them to the console.

 

Create Project: Allow the user to make a dance routine using list commands.

Standards:

 

2-AP-11: Use Variables

Learning Targets:

  • Create a list to store values

  • Determine the index of an element in a list

  • Use insert() to place an item at a specific index

  • Count the number of items in a list using len()

  • Retrieve a value from a list based on its index

  • Delete a specific range of indexes from a list

  • Use string formatting to insert variables in a string

  • Print information to the console as output

Lesson 5 - Alien Whack-a-Mole

 

Build a game and associate the objective to point values by using a dictionary.

 

Create Project: Use dictionaries to create a shape-based art generator.

Standards:

 

2-AP-11: Use Variables

 

2-AP-14: Functions

 

2-AP-19: Comments and Documentation

Learning Targets:

  • Create a dictionary to store key:value pairs

  • Retrieve a value from a dictionary based on its key

  • Add and remove values from a dictionary

Lesson 6 - High Score

 

Read and write to a CSV file in order to save high score data for a game.

 

Create Project: Add the capability to save users' high score information for a game of the student's choice.

Standards:

 

2-DA-08: Data Visualization

 

Learning Targets:

  • Read data from a CSV file and store it in a list of lists

  • Use open and close commands to manage file access

  • Use print() to print text to the console

  • Write data to a new CSV file from a list of lists

Lesson 7 - Enter Password

 

Simulate a login page by continuously requesting a password until the user enters it correctly.

 

Create Project: Design an endlessly looping animation in the style of a GIF.

Standards:


2-AP-12: Control Structures

Learning Targets:

  • Use a while loop to iterate an indeterminate number of times

  • Use break and continue statements in loops

  • Understand how to read data from a Google spreadsheet

  • Understand how to multiply strings by an integer

Lesson 8 - Starry Night

 

Generate a scene based on user input, preventing input errors from halting the program.

 

Create Project: Allow the user to answer questions to design a screen saver animation.

Standards:

 

2-AP-17: Test and Refine

Learning Targets:

  • Use a try statement to handle errors from user input

  • Use try-else to continue a program despite errors

  • Use except and raise statements to control how exceptions are handled

Lesson 9 - Ice Cream Shoppe

 

Serve the user a frozen desert depending on their choices using nested if statements to narrow the options.

 

Create Project: Write a Choose-Your-Own-Adventure style story with multiple branches that take the user down different paths.

Standards:

 

2-AP-12: Control Structures

Learning Targets:

  • Use nested conditionals

  • Use comparison operators

  • Use if, elif, and else statements

  • Create functional branches in programs

Lesson 10 - Maze Maker

 

Plan a maze by mapping it to a two-dimensional list and use nested loops to place it on the stage.

 

Create Project: Draw a picture using a two-dimensional list.

Standards:

 

2-AP-11: Use Variables

 

2-AP-12: Control Structures

Learning Targets:

  • Construct a 2D list as a list of lists

  • Use nested loops to iterate through the 2D list

  • Nest conditionals inside of loops

Create your own Knowledge Base