Summer SAVY, Session 3 Day 3, “Introduction to Python for Beginners” (7th-8th)
Hello Parents and Students!
We’ve wrapped up Day 3 of our Intro to Python for Beginners course, and today we took a major step forward: learning how to organize and reuse code like real programmers!
What We Learned
Students were introduced to functions, which allow them to group commands into reusable pieces. We also explored modules, which help store and share code more efficiently, just like software developers do in real projects!
Here’s what students did today:
- Defined and called custom functions with parameters and return values.
- Understood the difference between local and global variables.
- Wrote functions with default values and flexible arguments.
- Imported Python modules like math and random to extend their programs.
- Created their own custom modules and used them across notebooks.
Students worked on several practice codes to develop custom functions with various parameters (default and *args) to return a value. Students learned how to explore the various tools within a module and create their own custom module with various tools.
In the last hour of class, students worked on their projects, using functions and modules to make their code smarter and more efficient.
Student Reflection
- Students used functions to make their code way easier to read, like naming what each part does!
- They created their own module today, it’s like creating a mini-toolbox for their use.
Family Conversation
We encourage students to share what they learned at home. Ask students the following questions:
- What is a function in Python, and how is it helpful?
- What is a function you wrote today, and what does it do?
- How did you use functions and modules for your mini projects?
Looking Ahead to Day 4
Tomorrow’s focus is on file handling, specifically how to store more complex data and save it for later use. We’ll learn how to read from and write to files in Python and practice working with data saved in the file.