Local variables and naming conventions
📖 Scenario: You are helping a small bakery keep track of daily sales. You will use local variables with clear names to store and calculate the total number of bread loaves sold.
🎯 Goal: Create local variables with proper names to store daily sales numbers, add them up, and print the total loaves sold.
📋 What You'll Learn
Create local variables with lowercase letters and underscores
Use descriptive variable names for daily sales
Add the daily sales variables to get the total
Print the total number of loaves sold
💡 Why This Matters
🌍 Real World
Local variables are used everywhere in programming to store temporary information like daily sales, user input, or calculation results.
💼 Career
Clear variable naming and using local variables properly is a fundamental skill for any programmer, making your code easier to maintain and collaborate on.
Progress0 / 4 steps