Practice Python
Python fundamentals, pandas and NumPy problems built on the lessons. Every problem runs in your browser and checks your answer.
Level 1
0 / 30 XP
Data Newbie
30 XP to the next level
0 / 63 solved
Python fundamentals
Write small functions with strings, lists, dictionaries, logic and classes.
Strings0 / 5
Lists and loops0 / 5
Dictionaries and counting0 / 5
- Best-selling categorydictionaries, tuples, max with key10 XPProEasy
- Count words in reviewsdictionaries, get, lower10 XPProEasy
- Combine two stock countsdictionaries, set union, get20 XPProMedium
- Flip a mappingdictionaries, sets, sorted20 XPProMedium
- Group people by teamlist of dictionaries, setdefault, sorted20 XPProMedium
Functions and logic0 / 5
- Score to gradeif elif, input checks10 XPProEasy
- Shipping fee rulesif elif else, default arguments10 XPProEasy
- Conversion rates without crashingtry except, ZeroDivisionError, round20 XPProMedium
- Count business daysdatetime, timedelta, weekday20 XPProMedium
- Password rule checkerany, string methods, lists20 XPProMedium
Classes0 / 5
- A simple wallet classclass, __init__, methods, raise10 XPProEasy
- Page view counterclass, dictionary attribute, sorted10 XPProEasy
- Employees and managersinheritance, super, overriding methods20 XPProMedium
- Shopping basket with a discount codeclass, list attribute, methods, round20 XPProMedium
- Stock tracker with low-stock alertsclass, dictionary attribute, raise, sorted20 XPProMedium
pandas
Answer business questions on simulated company data.
Selecting and filtering0 / 3
Cleaning data0 / 3
Grouping0 / 3
Combining tables0 / 3
Reshaping0 / 3
Dates and text0 / 3
Window calculations0 / 3
Analytics patterns0 / 4
- A promotion review in three stepsWalmart · resample, groupby share, merge, idxmax · 3 steps60 XPProMedium
- Current plan of every subscriberNetflix · latest record per key, drop_duplicates, merge20 XPProMedium
- Free trial conversion by planSpotify · dates, boolean logic, groupby mean20 XPProMedium
- The hiring funnelLinkedIn · nunique, isin, map, funnels · 3 steps60 XPProMedium
NumPy
Array maths, simulations and the from-scratch tasks interviewers like.