Machine learning and Python interview questions
515 questions on 27 topics from the Python, Data Tools, Maths, Statistics and Machine Learning courses, from first principles to the follow-ups an interviewer asks next. Every question is free to read, and so are the first 3 model answers on each page.
Worked machine learning interview problemsCheat sheetsAI glossaryAll free resources
Interview questions by topic
Each page covers one module of a course, so the questions follow the order the ideas are taught.
Python interview questions
- Module 1Jupyter and Python basics interview questions25 questions
From Getting Started.
- Module 2Python loops and conditions interview questions25 questions
From Control Flow.
- Module 3Python data structures interview questions25 questions
From Data Structures.
- Module 4Python functions interview questions25 questions
From Functions.
- Module 5Python modules and exceptions interview questions25 questions
From Organising Code.
- Module 6Python OOP interview questions25 questions
From Objects and Classes.
- Module 7Time complexity and Big O interview questions25 questions
From Time and Space Complexity.
The Python course teaches every topic these questions cover.
Data Tools interview questions
- Module 1NumPy interview questions22 questions
From NumPy.
- Module 2pandas interview questions9 questions
From pandas.
- Module 3Matplotlib and data visualisation interview questions8 questions
From Visualisation.
- Module 4scikit-learn interview questions9 questions
From The scikit-learn API.
The Data Tools course teaches every topic these questions cover.
Maths interview questions
- Module 0Maths for machine learning interview questions12 questions
From Why Maths Matters.
- Module 1Functions and logarithms interview questions15 questions
From Functions, Logarithms and Notation.
- Module 2Vectors and norms interview questions14 questions
From Vectors.
- Module 3Matrices and linear algebra interview questions15 questions
From Matrices.
- Module 4Calculus and optimisation interview questions15 questions
From Calculus and Optimisation.
- Module 5Floating point and numerical computing interview questions10 questions
From Numbers on a Computer.
The Maths course teaches every topic these questions cover.
Statistics interview questions
- Module 0Statistics fundamentals interview questions19 questions
From Why Statistics Matters.
- Module 1Descriptive statistics interview questions27 questions
From Describing Data and Reading Statistical Plots.
- Module 2Exploratory data analysis interview questions28 questions
From EDA, Evidence and Misleading Statistics.
- Module 3Probability interview questions26 questions
From Probability.
- Module 4Sampling and distributions interview questions26 questions
From Distributions and Dependence.
- Module 5Estimation and confidence intervals interview questions25 questions
From Estimation.
The Statistics course teaches every topic these questions cover.
Machine Learning interview questions
- Module 1Machine learning basics interview questions15 questions
From What Machine Learning Is.
- Module 2Feature analysis and data leakage interview questions12 questions
From Exploring a Dataset for Modelling.
- Module 3Linear regression and gradient descent interview questions15 questions
From Linear Regression and Gradient Descent.
- Module 4k-NN, cross-validation and regularisation interview questions18 questions
From The First Classifier, Generalisation and Regularisation.
The Machine Learning course teaches every topic these questions cover.
How to practise with them
- Answer each question out loud, or in writing, before you read the model answer.
- Then answer the follow-up an interviewer would ask: why it works, when it fails, and what you would check in code.
- Where you get stuck, go back to the module's lessons or its cheat sheet, then try the question again a day later.
Questions test. Lessons teach.
Every question comes from a course module, where the idea is taught from the intuition to code you run.