Objective
Create a Python program that calculates the total of a purchase and shows it formatted as money.
Instructions
- Read the price of an item (decimal) and the number of units (integer).
- Calculate the total by multiplying both.
- Show the total with two decimals and the
€symbol, with this format:Total: 7.50 €. Use an f-string.
2.5
3
Total: 7.50 €
Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.
Start exercise