diff --git a/modules/20-arithmetics/45-linting/en/EXERCISE.md b/modules/20-arithmetics/45-linting/en/EXERCISE.md index 5870f644..13b3c679 100644 --- a/modules/20-arithmetics/45-linting/en/EXERCISE.md +++ b/modules/20-arithmetics/45-linting/en/EXERCISE.md @@ -1,7 +1,9 @@ You received code from a colleague — it works correctly, but it violates the PEP8 formatting standard. Fix the spaces around the operators without changing the logic: -```python -print((5**2) - (3 * 7)) + + +```text +print( (5 **2)-(3* 7)) ``` The result must stay `4`. diff --git a/modules/20-arithmetics/45-linting/en/README.md b/modules/20-arithmetics/45-linting/en/README.md index bf4fd557..f856011d 100644 --- a/modules/20-arithmetics/45-linting/en/README.md +++ b/modules/20-arithmetics/45-linting/en/README.md @@ -6,8 +6,10 @@ Today you don't need to remember all the rules from the standard because there a Take a look at an example: -```python -result = 1 + 3 + + +```text +result = 1+ 3 ``` Linter will swear for breaking the rule: _E225 missing whitespace around operator_. By standard, the `+` operator must always be separated by spaces from the operands. diff --git a/modules/20-arithmetics/45-linting/es/EXERCISE.md b/modules/20-arithmetics/45-linting/es/EXERCISE.md index f91aa8ef..0e480ff1 100644 --- a/modules/20-arithmetics/45-linting/es/EXERCISE.md +++ b/modules/20-arithmetics/45-linting/es/EXERCISE.md @@ -1,7 +1,9 @@ Recibiste código de un colega: funciona correctamente, pero infringe el estándar de formato PEP8. Corrige los espacios alrededor de los operadores sin cambiar la lógica: -```python -print((5**2) - (3 * 7)) + + +```text +print( (5 **2)-(3* 7)) ``` El resultado debe seguir siendo `4`. diff --git a/modules/20-arithmetics/45-linting/es/README.md b/modules/20-arithmetics/45-linting/es/README.md index 792504b9..63b144c8 100644 --- a/modules/20-arithmetics/45-linting/es/README.md +++ b/modules/20-arithmetics/45-linting/es/README.md @@ -24,8 +24,10 @@ A día de hoy, el linter más rápido y popular del mundo Python se considera Ru Veamos un ejemplo: -```python -result = 1 + 3 + + +```text +result = 1+ 3 ``` Ese código se ve descuidado, y el linter señalará el error con razón. Así se ve el proceso de comprobación: diff --git a/modules/20-arithmetics/45-linting/ru/EXERCISE.md b/modules/20-arithmetics/45-linting/ru/EXERCISE.md index d5c52255..2e876f73 100644 --- a/modules/20-arithmetics/45-linting/ru/EXERCISE.md +++ b/modules/20-arithmetics/45-linting/ru/EXERCISE.md @@ -1,7 +1,9 @@ Вы получили код от коллеги — он работает правильно, но нарушает стандарт оформления PEP8. Исправьте пробелы вокруг операторов, не меняя логику: -```python -print((5**2) - (3 * 7)) + + +```text +print( (5 **2)-(3* 7)) ``` Результат должен остаться `4`. diff --git a/modules/20-arithmetics/45-linting/ru/README.md b/modules/20-arithmetics/45-linting/ru/README.md index 62f660f4..402070f6 100644 --- a/modules/20-arithmetics/45-linting/ru/README.md +++ b/modules/20-arithmetics/45-linting/ru/README.md @@ -24,8 +24,10 @@ Рассмотрим пример: -```python -result = 1 + 3 + + +```text +result = 1+ 3 ``` Такой код выглядит неаккуратно, и линтер справедливо укажет на ошибку. Вот как выглядит процесс проверки: