Beginner
Print a tidy receipt line
Set total to price times qty. Then print one line with an f-string: the item name left-aligned in 10 characters, followed by the total right-aligned in 8 characters with 2 decimals.
For Notebook, 45.5 and 3, the line is Notebook 136.50 (four spaces sit between the name and the number: two from the name padding, two from the number padding).
What Check tests
totalis 136.5- The program prints exactly one line
- The line is
Notebook 136.50
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.