Functions

Local vs Global Variables, Passing Multiple Parameters, and Returning Multiple Values

Introduction: In Python, understanding how variables are stored and used in functions is important. This page introduces key concepts that help us organise and use data effectively in functions. We’ll look at: Local vs Global Variables: Differentiating between variables defined inside a function (local) and those defined outside (global). Passing Multiple Parameters: How to pass …

Local vs Global Variables, Passing Multiple Parameters, and Returning Multiple Values Read More »

Functions & Parameters

Introduction: In Python, functions are a powerful way to organise and reuse code. They become even more useful when we can pass values to them, allowing the same function to work with different data. These values are passed into the function using parameters and arguments. What is a Parameter? A parameter is a placeholder or …

Functions & Parameters Read More »

Scroll to Top