---------------------------------------------------------------------------
KeyboardInterrupt Traceback (most recent call last)
/Users/sachit/vscode/fastpages-sachit-blog/_notebooks/2022-08-29-Python_Quiz.ipynb Cell 2 in <cell line: 12>()
<a href='vscode-notebook-cell:/Users/sachit/vscode/fastpages-sachit-blog/_notebooks/2022-08-29-Python_Quiz.ipynb#W1sZmlsZQ%3D%3D?line=8'>9</a> correct = 0
<a href='vscode-notebook-cell:/Users/sachit/vscode/fastpages-sachit-blog/_notebooks/2022-08-29-Python_Quiz.ipynb#W1sZmlsZQ%3D%3D?line=10'>11</a> print("Hello, you will be asked " + str(questions) + " questions.")
---> <a href='vscode-notebook-cell:/Users/sachit/vscode/fastpages-sachit-blog/_notebooks/2022-08-29-Python_Quiz.ipynb#W1sZmlsZQ%3D%3D?line=11'>12</a> ready = input("Are you ready to take the test?")
<a href='vscode-notebook-cell:/Users/sachit/vscode/fastpages-sachit-blog/_notebooks/2022-08-29-Python_Quiz.ipynb#W1sZmlsZQ%3D%3D?line=13'>14</a> rsp = question_with_response("What is the fastest land animal?")
<a href='vscode-notebook-cell:/Users/sachit/vscode/fastpages-sachit-blog/_notebooks/2022-08-29-Python_Quiz.ipynb#W1sZmlsZQ%3D%3D?line=14'>15</a> if rsp == "cheetah":
File ~/Library/Python/3.8/lib/python/site-packages/ipykernel/kernelbase.py:1177, in Kernel.raw_input(self, prompt)
1173 if not self._allow_stdin:
1174 raise StdinNotImplementedError(
1175 "raw_input was called, but this frontend does not support input requests."
1176 )
-> 1177 return self._input_request(
1178 str(prompt),
1179 self._parent_ident["shell"],
1180 self.get_parent("shell"),
1181 password=False,
1182 )
File ~/Library/Python/3.8/lib/python/site-packages/ipykernel/kernelbase.py:1219, in Kernel._input_request(self, prompt, ident, parent, password)
1216 break
1217 except KeyboardInterrupt:
1218 # re-raise KeyboardInterrupt, to truncate traceback
-> 1219 raise KeyboardInterrupt("Interrupted by user") from None
1220 except Exception:
1221 self.log.warning("Invalid Message:", exc_info=True)
KeyboardInterrupt: Interrupted by user