Lesson 8️⃣: Subroutines

Bitesize Key points from this lesson

  1. This lesson was focused on Subroutines and the difference between procedures and functions.
  2. We learned how to define our own functions using the def keyword, followed by the function name and parentheses.
  3. We learned about parameters and arguments, which allow us to pass information
  4. We explored the concept of return values and how functions can return values using the return statement.
  5. we spoke about refactoring code by breaking it down into smaller, reusable functions.
  6. finally, we explored the concept of local and global scope, understanding how variables defined within a function are local to that function, while variables defined outside of functions are global.

Activities

The best way to improve your programming skills is to practice.
I created a course for learning Python that you can follow alongside these lessons.
You can check these out at BitFez’s Learning to code in Python Roadmap 🛣
You should specifically follow the Step 4: Functions activities: