fix: prereq-safe задачи в уроках 4-6 + синтаксис if-result (P0.2) - #12
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3d73b0ec3f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| text( | ||
| "if-result", | ||
| "Что выведет `if 3 > 5: print('да') else: print('нет')`?", | ||
| "Что выведет этот код?\n\nif 3 > 5:\n print('да')\nelse:\n print('нет')", |
There was a problem hiding this comment.
Preserve the line breaks in the if-result prompt
When this question is shown in lessons, exams, or practice, questionTemplate() inserts rich(question.prompt) into a normal <div>, and .question-prompt does not preserve whitespace. The browser therefore collapses these newlines and indentation, displaying the code approximately as if 3 > 5: print('да') else: print('нет')—the same invalid one-line syntax this change intends to fix. Render the snippet as a code block or otherwise preserve its whitespace.
Useful? React with 👍 / 👎.
730bfed to
e0234ff
Compare
Уроки 4-6 больше не требуют def/return (урок 7) и списков (урок 8): код-задачи переведены на stdout-тесты. Вопрос if-result переписан синтаксически корректным многострочным if/else. ID/kinds/количество заданий сохранены. pytest: 10 passed. Добавлен регрессионный тест test_lessons_four_to_six_do_not_require_future_topics.