0
0
Pythonprogramming~10 mins

Variable assignment in Python - Mini Project: Build & Apply

Choose your learning style9 modes available
Variable assignment in Python
📖 Scenario: You are helping a small bakery keep track of the number of cakes they have made today.
🎯 Goal: You will create variables to store the number of cakes made in the morning and afternoon, then calculate the total cakes made in the day.
📋 What You'll Learn
Create variables with exact names and values as instructed
Use simple addition to combine values
Print the final total number of cakes
💡 Why This Matters
🌍 Real World
Tracking daily production numbers helps businesses understand their output and plan better.
💼 Career
Variable assignment is a fundamental skill used in all programming jobs to store and manipulate data.
Progress0 / 4 steps
1
Create morning cakes variable
Create a variable called morning_cakes and set it to 15.
Python
Need a hint?

Use the equals sign = to assign the value 15 to the variable morning_cakes.

2
Create afternoon cakes variable
Create a variable called afternoon_cakes and set it to 20.
Python
Need a hint?

Use the equals sign = to assign the value 20 to the variable afternoon_cakes.

3
Calculate total cakes
Create a variable called total_cakes and set it to the sum of morning_cakes and afternoon_cakes.
Python
Need a hint?

Use the plus sign + to add the two variables and assign the result to total_cakes.

4
Print total cakes
Write a print statement to display the value of total_cakes.
Python
Need a hint?

Use print(total_cakes) to show the total number of cakes made.