Lesson 3 of 5
Working with numbers
Operators: + - * /, integer division //, modulo %, power **. Division / always returns a float.
round(x, n) rounds x to n decimal places — essential when dealing with money.
print(17 // 5) # 3 print(17 % 5) # 2
🎯 Exercise
The variable net is 40 (price before tax). Compute gross = net × 1.19 (19% VAT), rounded to 2 decimals with round(), then print gross.
main.py
Loading editor…
Loading Python…
Output
Run your code to see the result here.