← All lessons

Arithmetic

Sign in · Sign up

Lesson 1.3

The seven Python operators:

Operator What it does Example Result
+ addition 2 + 3 5
- subtraction 5 - 2 3
* multiplication 2 * 3 6
/ division 7 / 2 3.5
// floor division 7 // 2 3
% remainder 7 % 2 1
** power 2 ** 3 8

A shop gives a 10% discount. The discount means paying nine tenths of the price, that is price * 0.9.

Print the discounted price for items that cost 100, 50 and 200 — each on a new line.

Hint

Minus 10% means multiplying by 0.9.

Work out the three items and print each result with its own print, in the same order as in the task.