Python · Exercise 6 of 6 Previous
Beginner
Add prices exactly
Three prices are already created as Decimal values. Make total the exact sum of price_a, price_b and price_c.
Print it as Total: 25.10. Do not turn the prices into floats.
What Check tests
totalis aDecimaltotalequals25.10totalshows two decimals- No float is used
- The program prints
Total: 25.10
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.