From 032feec31e9f515a6ddfa9a31de1526232151bbd Mon Sep 17 00:00:00 2001 From: Stefan Guseinov <22242004+mrguseinov@users.noreply.github.com> Date: Thu, 7 Nov 2024 13:32:28 +0300 Subject: [PATCH] Bug fixes and improvements (#52) --- chapters/chapter-03/chapter-03-quiz-1.ipynb | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/chapters/chapter-03/chapter-03-quiz-1.ipynb b/chapters/chapter-03/chapter-03-quiz-1.ipynb index 28fe344..ec4b6ed 100644 --- a/chapters/chapter-03/chapter-03-quiz-1.ipynb +++ b/chapters/chapter-03/chapter-03-quiz-1.ipynb @@ -168,20 +168,19 @@ "\n", "### Question 4\n", "\n", - "The following code looks perfect but Python gives you an `Indentation Error` on the second `print` function:\n", + "The following code looks perfect but Python gives you a `TabError` on the second `print` function. Why?\n", "\n", "```python\n", - "if x == 6:\n", - " print(\"Is 6\")\n", - " print(\"Is Still 6\")\n", - " print(\"Third 6\")\n", - "```\n", + "x = 5\n", "\n", - "What is the most likely reason?\n", + "if x > 0:\n", + " print(\"hello\")\n", + " print(\"world\")\n", + "```\n", "\n", - "1. In order to make humans feel inadequate, Python randomly emits `Indentation Errors` on perfectly good code — after about an hour the error will just go away without any changes to your program.\n", + "1. Sometimes Python randomly emits `TabError` on perfectly good code — after about an hour the error will just go away without any changes to your program.\n", "2. You have mixed tabs and spaces in the file.\n", - "3. Python thinks `Still` is a mis-spelled word in the string.\n", + "3. Python thinks `world` is a mis-spelled word in the string.\n", "4. Python has reached its limit on the largest Python program that can be run." ] },