Python Basics That Make Work Easier
Write and run small Python programs that display information, use values, calculate totals, and make decisions. Finish by combining those skills in a practical coffee-order calculation.
For: adults.
Lessons
- Give Python its first instruction – Write a line of Python that displays a message.
- Give a value a useful name – Choose a variable name that clearly describes a stored value.
- Calculate a total from real numbers – Calculate the total cost of Priya's coffee order in Python.
- Let a condition choose what happens – Choose a condition for deciding whether Priya's order qualifies for a discount.
- Repeat a calculation for a full order – Write a program that calculates Priya's three coffee orders and combines their costs.