Beginner
Add up a snack bill
A tea costs 15 and a samosa costs 20. The program already remembers both prices.
Create a variable named total that adds the two prices, then print it in the form Total: 35. (A variable is a name that remembers a value, like tea and samosa above. Topic 1.1 teaches variables.)
Calculate the total from tea and samosa; don't type 35 yourself.
What Check tests
- There is a variable named
total totalis 35totalis calculated fromteaandsamosa- The program prints
Total: 35
Stuck? One hint at a time
The solution unlocks after your first Check. Try first: that is where the learning happens.
main.py
Sign in to run your code.
Output
Press Run to see what your program prints.