Using the sum() Function in Python
๐ Scenario: You are helping a small shop owner who wants to quickly add up the prices of items sold in a day.
๐ฏ Goal: Build a simple program that uses the sum() function to add all the prices in a list and show the total sales.
๐ What You'll Learn
Create a list of item prices
Create a variable to hold the total sum
Use the sum() function to add all prices
Print the total sum
๐ก Why This Matters
๐ Real World
Adding prices or scores quickly is common in shops, schools, and many daily tasks.
๐ผ Career
Knowing how to sum values helps in data analysis, finance, and programming jobs where totals are needed.
Progress0 / 4 steps