LESSON 14
Practical Automation
Learning objective: Use Python to automate a small repetitive task.
Understand
Automation is one of Python's most useful superpowers.
By combining loops, files, and modules, you can automate boring tasks — renaming files, summarizing data, or generating reports. Even a few lines of Python can save real time.
Analogy: Automation is like setting up dominoes once and letting them fall on their own.
See It in Action
Summarizing a list of numbers:
nums = [12, 5, 8, 20]
print("Total:", sum(nums))
print("Average:", sum(nums) / len(nums))How it works:
sum and len combine to compute a total and average automatically — no manual math needed.Try It Yourself
- Automate a simple calculation over a list.
- Print a small summary report.
- Think of one real task you could automate.
Quick Quiz
What makes Python great for automation?
Challenge
Write a script that reads a list of values and prints a useful summary.
Success condition: Your script produces a correct summary from the data.
+10 XP
Lesson Complete
You answered correctly and completed the required practice. Your progress has been saved on this device.
Continue to next lesson →