All curricula

Middle School Python

A beginner Python track for middle-school students covering algorithms, variables, conditionals, loops, functions, lists, debugging, and a small final project.

Middle school grades 6-8 / Python basics / NY computer science and digital fluency

Middle School Python

A beginner Python track for middle-school students covering algorithms, variables, conditionals, loops, functions, lists, debugging, and a small final project.

5 units400 checked answers5 units, 8-12 weeks project cycle
Outcomes
  • Write small Python programs using explicit inputs, outputs, and state.
  • Debug by reading errors, tracing code, and testing edge cases.
  • Build a final project that shows algorithmic thinking instead of copied snippets.

Study links

Source index

Unit sequence

Start at unit 1. Move forward only after the checks are clean.

  1. 01

    Algorithms, values, and variables

    80 checks
    • Describe algorithms as ordered steps with clear inputs and outputs.
    • Use variables, expressions, strings, numbers, and print statements.

    Practice: Write a calculator-style script and trace every variable value after each line.

    Open practice checks
    Sequenced original practice checks

    Move in order: foundation, transfer, analysis, timed readiness, then metacognitive repair.

    6 shown / 80 checked answers
    Exercise path
    Foundation: 37Developing: 22Proficient: 14Advanced: 7

    Start the next sequenced check: #1 Loop trace. Do not jump ahead until this one is correct.

    Learning analysis
    0/80
    Tried
    0
    Correct
    0%
    Mastery

    Weakest facet: Concept

    #1Loop traceApplicationfoundationNext

    Set 2: how many times does for i in range(5) run?

    #2List accessFluencyfoundation

    Set 2: nums = [5, 6, 9]. What is nums[2]?

    #3Arithmetic traceFluencyfoundation

    Set 1: Python evaluates 4 + 6 * 2 as what?

    #4Floor divisionFluencydeveloping

    Set 1: what is 20 // 4 in Python?

    #5Loop traceApplicationfoundation

    Set 1: how many times does for i in range(4) run?

    #6List accessFluencyfoundation

    Set 1: nums = [4, 5, 8]. What is nums[2]?

  2. 02

    Conditionals and input validation

    80 checks
    • Use if, elif, else, comparison, and Boolean logic.
    • Validate user input before the program relies on it.

    Practice: Build a quiz or eligibility checker with three branches and two invalid-input cases.

    Open practice checks
    Sequenced original practice checks

    Move in order: foundation, transfer, analysis, timed readiness, then metacognitive repair.

    6 shown / 80 checked answers
    Exercise path
    Foundation: 37Developing: 22Proficient: 14Advanced: 7

    Start the next sequenced check: #1 Loop trace. Do not jump ahead until this one is correct.

    Learning analysis
    0/80
    Tried
    0
    Correct
    0%
    Mastery

    Weakest facet: Concept

    #1Loop traceApplicationfoundationNext

    Set 4: how many times does for i in range(8) run?

    #2List accessFluencyfoundation

    Set 4: nums = [8, 9, 12]. What is nums[2]?

    #3Loop traceApplicationfoundation

    Set 1: how many times does for i in range(5) run?

    #4List accessFluencyfoundation

    Set 1: nums = [5, 6, 9]. What is nums[2]?

    #5Loop traceApplicationfoundation

    Set 3: how many times does for i in range(7) run?

    #6List accessFluencyfoundation

    Set 3: nums = [7, 8, 11]. What is nums[2]?

  3. 03

    Loops, functions, and debugging

    80 checks
    • Use for and while loops for repeated work.
    • Write functions with parameters and return values.

    Practice: Refactor repeated code into a function and explain one bug found through tracing.

    Open practice checks
    Sequenced original practice checks

    Move in order: foundation, transfer, analysis, timed readiness, then metacognitive repair.

    6 shown / 80 checked answers
    Exercise path
    Foundation: 37Developing: 22Proficient: 14Advanced: 7

    Start the next sequenced check: #1 Loop trace. Do not jump ahead until this one is correct.

    Learning analysis
    0/80
    Tried
    0
    Correct
    0%
    Mastery

    Weakest facet: Concept

    #1Loop traceApplicationfoundationNext

    Set 6: how many times does for i in range(11) run?

    #2List accessFluencyfoundation

    Set 6: nums = [11, 12, 15]. What is nums[2]?

    #3BooleanAnalysisdeveloping

    Set 1: what is 6 < 7 and 8 > 9?

    #4FunctionApplicationdeveloping

    Set 1: def f(x): return x + 6. What is f(8)?

    #5Loop traceApplicationfoundation

    Set 5: how many times does for i in range(10) run?

    #6List accessFluencyfoundation

    Set 5: nums = [10, 11, 14]. What is nums[2]?

  4. 04

    Lists, dictionaries, and small data

    80 checks
    • Store collections in lists and dictionaries.
    • Loop through data to count, filter, and summarize.

    Practice: Analyze a small class-data list and print one summary, one maximum, and one filtered result.

    Open practice checks
    Sequenced original practice checks

    Move in order: foundation, transfer, analysis, timed readiness, then metacognitive repair.

    6 shown / 80 checked answers
    Exercise path
    Foundation: 37Proficient: 14Developing: 22Advanced: 7

    Start the next sequenced check: #1 Loop trace. Do not jump ahead until this one is correct.

    Learning analysis
    0/80
    Tried
    0
    Correct
    0%
    Mastery

    Weakest facet: Concept

    #1Loop traceApplicationfoundationNext

    Set 8: how many times does for i in range(14) run?

    #2List accessFluencyfoundation

    Set 8: nums = [14, 15, 18]. What is nums[2]?

    #3DictionaryFluencyfoundation

    Set 1: data = {"score": 87}. What is data["score"]?

    #4AccumulatorAnalysisproficient

    Set 1: a loop adds 7, 8, 11. What total should the accumulator hold?

    #5Loop traceApplicationfoundation

    Set 7: how many times does for i in range(13) run?

    #6List accessFluencyfoundation

    Set 7: nums = [13, 14, 17]. What is nums[2]?

  5. 05

    Final project and code review

    80 checks
    • Plan a small project with requirements, tests, and a readable structure.
    • Explain design choices and edge cases during review.

    Practice: Submit a working project with sample input/output, three tests, and a short reflection on the hardest bug.

    Open practice checks
    Sequenced original practice checks

    Move in order: foundation, transfer, analysis, timed readiness, then metacognitive repair.

    6 shown / 80 checked answers
    Exercise path
    Foundation: 37Proficient: 14Advanced: 7Developing: 22

    Start the next sequenced check: #1 Loop trace. Do not jump ahead until this one is correct.

    Learning analysis
    0/80
    Tried
    0
    Correct
    0%
    Mastery

    Weakest facet: Concept

    #1Loop traceApplicationfoundationNext

    Set 10: how many times does for i in range(17) run?

    #2List accessFluencyfoundation

    Set 10: nums = [17, 18, 21]. What is nums[2]?

    #3Input validationExam Readinessproficient

    Set 1: which value passes age >= 8?

    #4Test countExam Readinessadvanced

    Set 1: a project has 8 normal tests and 3 edge tests. How many total tests?

    #5Loop traceApplicationfoundation

    Set 9: how many times does for i in range(16) run?

    #6List accessFluencyfoundation

    Set 9: nums = [16, 17, 20]. What is nums[2]?

Middle School Python curriculum · PeerTutor