// blog

Articles

// Functions
PARAMETERS Mini Project — BMI Calculator

The problem...
You've built the BMI Calculator before. It asked for input, calculated, and printed. One long block.
Now you have parameters. Same logic — but cleaner.
The…

05 May 2026 1 min read files [1] comments [0] 19 views
// Functions
Your function finally talks back

The problem...
Your functions calculate things. They print things. But the result stays inside the function — and disappears when the function ends.
You can't use it. You …

05 May 2026 1 min read files [1] comments [0] 20 views
// Functions
RETURN Mini Project — Username Generator

The problem...
Your Username Generator function calculates and prints — all in one place. That works. But what if you want to use the username somewhere else? Store it. Pas…

05 May 2026 1 min read files [1] comments [0] 20 views
// Functions
RETURN Mini Project — BMI Calculator

The problem...
Your BMI Calculator calculates and prints — all in one function. But you can't use the BMI value anywhere else. You can't check the category. You can't store…

05 May 2026 1 min read files [1] comments [0] 19 views
// Functions
Local vs global — where variables live

The problem...
You define a variable inside a function. You try to use it outside. Python says it doesn't exist.
Or you define a variable outside and try to change it inside a f…

05 May 2026 2 min read files [1] comments [0] 20 views
// Functions
Return two things at once

The problem...
Your function calculates two things. But return sends back one value and stops.
You'd need two functions. Or you'd print one and return the other. Neither feels c…

05 May 2026 1 min read files [1] comments [0] 20 views