
Jupyter & Google Colab
Jupyter notebooks, markdown, magic commands, Google Colab, GPU, collaboration, best practices
1What is a Jupyter notebook?
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.
2What are the two main types of cells in a Jupyter notebook?
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.
3How to execute a cell in a Jupyter notebook?
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.
Which magic command measures the execution time of a single line of code?
What is the difference between Edit and Command modes in Jupyter?
+13 interview questions
Other Data Science & ML interview topics
Python Basics
Python Object-Oriented Programming
Python Data Structures
Git Fundamentals
SQL Basics
NumPy Fundamentals
Pandas Basics
SQL Joins & Advanced Queries
Advanced Pandas
Visualization with Matplotlib & Seaborn
Interactive Visualizations with Plotly
Descriptive Statistics
Inferential Statistics
Web Scraping
BigQuery & Cloud Data
Feature Engineering
Supervised ML: Regression
Supervised ML: Classification
Decision Trees & Ensembles
Unsupervised ML
ML Pipelines & Validation
Time Series & Forecasting
Deep Learning Fundamentals
TensorFlow & Keras
CNN & Image Classification
RNN & Sequences
Transformers & Attention
NLP & Hugging Face
GenAI & LangChain
MLOps & Deployment
Master Data Science & ML for your next interview
Access all questions, flashcards, technical tests, code review exercises and interview simulators.
Start for free