Programming Basics
The core building blocks of code: variables, functions, parameters, and more
Function
beginnerA reusable block of code that performs a specific task. You give it a name, and whenever you need that task done, you 'call' the function by name instead of writing the same code again. Functions can accept inputs and produce outputs.
Parameter
beginnerA variable listed in a function's definition that acts as a placeholder for data the function will receive when it's called. Parameters let you write one function that works with many different inputs instead of hard-coding specific values.
Return Value
beginnerThe output a function sends back to the code that called it. When a function reaches a 'return' statement, it stops running and hands back that value. The calling code can then store it in a variable, display it, or pass it to another function.
Variable
beginnerA named container that holds a value in your program. Think of it like a labeled box: the label is the variable's name, and inside is the data (a number, some text, a list, etc.). You can read what's inside, replace it, or use it in calculations.