Home API Notes

Objective:

  • To teach students about data structures, specifically lists, dictionaries, and 2D arrays
  • To teach students about iteration
  • To teach students how to store list and dictionary content in databases
  • To reinforce these concepts by building simulations/interactions using lists and iteration
  • To improve on previous lessons and topics by building on existing knowledge

Materials:

  • Whiteboard and markers
  • Computers for each student or group of students
  • Python programming language installed on each computer
  • Access to a database management system (e.g. SQLite)

Procedures:

Introduction (10 minutes)

Start by introducing the concept of data structures and their importance in programming. Briefly explain what lists, dictionaries, and 2D arrays are and how they are used in programming. Introduce the concept of iteration and how it is used in programming.

Visualization (20 minutes)

Use a whiteboard or visual aids to demonstrate how lists, dictionaries, and 2D arrays work. Show examples of different types of data that can be stored in each type of data structure. Demonstrate how iteration works using a visual example.

Building Simulations/Interactions (30 minutes)

Have students work in pairs or small groups to build a simple simulation or interaction using lists and iteration. Encourage them to be creative and to think about different types of data they can store in lists and dictionaries. Circulate around the classroom and provide assistance as needed.

Storing List and Dictionary Content in Databases (20 minutes)

Explain how to store list and dictionary content in databases using Python. Use an example database management system (e.g. SQLite) to demonstrate how to create a database and how to store data in it. Have students practice creating a simple database and storing data in it.

Review (10 minutes)

Review the concepts covered in the lesson, including data structures, iteration, and storing data in databases. Have students share their simulations/interactions and discuss how they used lists and iteration to create them.

Extra Notes

  • Monitor student progress during the simulation/interaction building portion of the lesson.
  • Evaluate student understanding through observation and discussion.
  • Assign homework to reinforce the concepts covered in the lesson, such as building a more complex simulation using lists and iteration or storing data in a database.