Data Science & ML

Jupyter & Google Colab

Jupyter notebooks, markdown, magic commands, Google Colab, GPU, collaboration, best practices

16 interview questionsยท
Junior
1

What is a Jupyter notebook?

Answer

A Jupyter notebook is an interactive document that combines executable code, formatted text (Markdown), visualizations and outputs in a web interface. The .ipynb (IPython Notebook) format stores content as JSON, making it easy to share code and results. The name Jupyter comes from Julia, Python and R, the three languages initially supported.

2

What are the two main types of cells in a Jupyter notebook?

Answer

Jupyter notebooks mainly contain Code cells for executing Python code and Markdown cells for formatted text. Code cells allow running code and displaying results directly. Markdown cells support formatting, headings, lists, links and even LaTeX formulas to document the work.

3

How to execute a cell in a Jupyter notebook?

Answer

The Shift+Enter shortcut is the standard way to execute a cell in Jupyter. This shortcut runs the active cell and automatically moves to the next one. It is also possible to use Ctrl+Enter to execute without advancing, or the Run button in the toolbar. These shortcuts work in Jupyter Notebook, JupyterLab and Google Colab.

4

Which magic command measures the execution time of a single line of code?

5

What is the difference between Edit and Command modes in Jupyter?

+13 interview questions

Master Data Science & ML for your next interview

Access all questions, flashcards, technical tests, code review exercises and interview simulators.

Start for free