Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions modules/20-arithmetics/40-priority/en/EXERCISE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ You and 4 friends (5 people in total) ordered 2 pizzas at 300 each and 4 drinks
Write a one-line program with `print()`, placing the parentheses so that the total is calculated first and only then divided among everyone:

```text
without parentheses: 2 * 300 + 4 * 50 / 5 = 640.0 ← wrong
with parentheses: (2 * 300 + 4 * 50) / 5 = 160.0 ← correct
2 * 300 + 4 * 50 / 5 = 640.0 ← without parentheses the division applies only to the drinks
```

Expected output: `160.0`.
5 changes: 3 additions & 2 deletions modules/20-arithmetics/40-priority/es/EXERCISE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Tú y 4 amigos (5 personas en total) pidieron 2 pizzas a 300 cada una y 4 bebida
Escribe un programa de una sola línea con `print()`, colocando los paréntesis de modo que primero se calcule el total y solo después se divida entre todos:

```text
sin paréntesis: 2 * 300 + 4 * 50 / 5 = 640.0 ← incorrecto
con paréntesis: (2 * 300 + 4 * 50) / 5 = 160.0 ← correcto
2 * 300 + 4 * 50 / 5 = 640.0 ← sin paréntesis la división se aplica solo a las bebidas
```

Salida esperada: `160.0`.
5 changes: 3 additions & 2 deletions modules/20-arithmetics/40-priority/ru/EXERCISE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Запишите программу из одной строки с `print()`, расставив скобки так, чтобы сначала посчиталась общая сумма, а затем делилась на всех:

```text
без скобок: 2 * 300 + 4 * 50 / 5 = 640.0 ← неверно
со скобками: (2 * 300 + 4 * 50) / 5 = 160.0 ← верно
2 * 300 + 4 * 50 / 5 = 640.0 ← без скобок деление применяется только к напиткам
```

Ожидаемый вывод: `160.0`.
Loading