Python Jupyter Notebooks Quiz
A 50-question quiz covering Jupyter Notebooks, from interface basics and cell types to magic commands, kernel execution, and advanced features.
Question 1
What is the primary file extension for a Jupyter Notebook?
Question 2
Which keyboard shortcut runs the current cell and advances to the next one?
Question 3
What are the two main modes in the Jupyter Notebook interface?
Question 4
How do you enter Command Mode from Edit Mode?
Question 5
What does the 'Kernel' menu allow you to do?
Question 6
In a code cell, what is displayed in the `Out[ ]:` area?
x = 10
x + 5
Question 7
How do you suppress the output of the last line in a code cell?
plt.plot(data)____
Question 8
What indicates that a code cell is currently running?
Question 9
Can you execute code from languages other than Python in a Jupyter Notebook?
Question 10
What happens to variables defined in one cell when you run a subsequent cell?
Question 11
How do you change a cell from Code to Markdown in Command Mode?
Question 12
Which syntax creates a second-level heading in a Markdown cell?
Question 13
How do you render a mathematical equation using LaTeX syntax?
The equation is: ____
Question 14
How do you create a bulleted list in Markdown?
Question 15
Can you execute Python code inside a Markdown cell?
Question 16
What does 'Restart Kernel & Clear Output' do?
Question 17
If you run cells out of order (e.g., Cell 3, then Cell 1, then Cell 2), what determines the variable state?
Question 18
How do you interrupt an infinite loop running in a cell?
Question 19
What does the execution count number `In [5]:` represent?
Question 20
Why might you choose to 'Restart & Run All'?
Question 21
Which library is commonly used to display rich HTML, images, or videos directly in the notebook output?
Question 22
How do Matplotlib plots appear in the notebook?
Question 23
Can a single cell produce multiple outputs?
Question 24
What happens if a cell produces a very long text output?
Question 25
How do you clear the output of a specific cell?
Question 26
What is the prefix for 'line magics' that affect a single line of code?
Question 27
What is the prefix for 'cell magics' that affect the entire cell?
Question 28
Which magic command measures the execution time of a line or cell?
Question 29
How do you run a shell command (like `ls` or `pip install`) from a notebook cell?
____ pip install numpy
Question 30
Which magic command lists all variables currently in the global namespace?
Question 31
What does the `%%writefile filename.py` magic do?
Question 32
How can you inspect the documentation for a function directly in the notebook?
print____
Question 33
What is the `%debug` magic used for?
Question 34
Can you use `input()` in a notebook?
Question 35
How do you reset the namespace (delete all variables) without restarting the kernel?
Question 36
Which tool allows converting `.ipynb` files to HTML, PDF, or Python scripts?
Question 37
What is `ipywidgets` used for?
Question 38
How do you install a library directly from a notebook cell to ensure it installs in the current kernel's environment?
Question 39
What is a 'Raw NBConvert' cell?
Question 40
Where are notebook checkpoints (autosaves) typically stored?
Question 41
What does the `%matplotlib notebook` magic do compared to `%matplotlib inline`?
Question 42
How can you hide the input code of a cell in the final exported HTML?
Question 43
What is 'JupyterLab'?
Question 44
Can you run a Jupyter Notebook on a remote server?
Question 45
What is the purpose of `%load filename.py`?
Question 46
How do you create a slide deck from a notebook?
Question 47
What is the difference between `%run script.py` and `import script`?
Question 48
How do you enable line numbers in a code cell?
Question 49
What does the blue bar on the left of a cell indicate?
Question 50
Can you use git to version control notebooks?
