Command Palette

Search for a command to run...

Hectal
Phase 1: Values, Variables and Types
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

  1. total is a Decimal
  2. total equals 25.10
  3. total shows two decimals
  4. No float is used
  5. 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.