Offline-ready lesson · progress saves on this device
Typing practiceStudy workspace →
Courses/Digital Literacy/Lesson 5

Lesson 5 of 5

Lists, Functions & Reusable Logic

Read the overview in
English overview

Store multiple values in indexed lists and organize repeated logic into functions with parameters, return values, and clear names.

1 hrBeginnerDetailed notes6 flashcards + 6 questions
Course outlineDigital Literacy

Why this lesson matters

Store multiple values in indexed lists and organize repeated logic into functions with parameters, return values, and clear names.

The goal is not to memorize vocabulary. By the end of the lesson, you should be able to use the ideas in a realistic situation, explain the reason for your choices, and check whether the result actually works for the intended person or task.

Learning objectives

  • Explain Index in your own words.
  • Apply Function to a realistic classroom or community example.
  • Connect Index with Parameter when making a decision.
  • Complete the practice task and reflect on one improvement.

Core ideas

1. Index

The numeric position of an item in an ordered collection; Python list indexes begin at zero.

In practice: Look for this idea while you complete the lesson task. Pause before each major step and explain how Index changes what you choose, create, or check.

2. Function

A named, reusable block of code designed to perform one clear task when it is called.

In practice: Look for this idea while you complete the lesson task. Pause before each major step and explain how Function changes what you choose, create, or check.

3. Parameter

A named input in a function definition that receives a concrete argument when the function is called.

In practice: Look for this idea while you complete the lesson task. Pause before each major step and explain how Parameter changes what you choose, create, or check.

How the ideas connect

Start with Index to understand the foundation of the lesson. Use Function to turn that understanding into an action. Then apply Parameter to check the quality, safety, or usefulness of the result. The three ideas are strongest when you can explain their relationship rather than treating them as separate definitions.

Guided walkthrough

  1. Name the goal. In one sentence, write what you are trying to understand, create, or improve.
  2. Make a prediction. Before touching a device, use Index and Function to predict what a strong result should look like.
  3. Complete the task. Write a function that receives a list of scores and returns the average. Test it with two lists, then explain what happens when the list is empty.
  4. Check the outcome. Use Parameter to inspect the result. Ask what worked, what did not, and what evidence supports your judgment.
  5. Explain and revise. Tell a partner what you changed and why. Make one small improvement, then compare the new result with the first one.

Worked classroom scenario

Imagine two learners sharing one device. The first learner is the driver and performs the steps; the second is the navigator and reads the goal, predicts the next step, and checks the result. Halfway through the task, switch roles. Both learners should be able to explain how Index, Function, and Parameter appeared in the work.

If no device is available, complete the same reasoning on paper: sketch the screen or result, label each decision, and describe what you would test when a device becomes available.

Common mistakes and fixes

  • Rushing into the tool: Write the goal and prediction first so every click or step has a reason.
  • Copying without understanding: After each major step, explain it in your own words to a partner.
  • Accepting the first result: Compare the outcome with the goal and make at least one deliberate improvement.
  • Letting one person control a shared device: Rotate driver and navigator roles so both learners think and practice.

Independent practice

Write a function that receives a list of scores and returns the average. Test it with two lists, then explain what happens when the list is empty.

For an extra challenge, adapt the task for a different audience or community need. Write two sentences explaining what changed and which lesson idea guided your decision.

Check your understanding

  1. How would you explain Index to someone new to the topic?
  2. What is one realistic example of Function outside this classroom?
  3. When might Parameter prevent a weak, unsafe, or confusing result?
  4. How are Index and Function connected?
  5. What evidence would convince you that your practice result works?
  6. If you repeated the activity tomorrow, what would you improve first and why?

Key takeaway

Store multiple values in indexed lists and organize repeated logic into functions with parameters, return values, and clear names.

You are ready to move on when you can explain the three core ideas, complete the practice without copying, and describe one improvement using evidence from your result.