A QUICK GUIDE
One step at a time.
Read one idea, try a little code, and use the feedback to improve it. Here’s how to find your way around.
New to machine learning? Start here.
The first lesson explains why a model needs a test set, shows a worked example, and leads into one exercise. Bring basic Python: variables, lists, and functions. The exercise runs in your browser.
Take the first lesson →Choose what you need next.
- Learn →
- Follow topics in order. Read the linked lessons, then try their exercises.
- Practice →
- Choose a skill to work on. Each set gives you a short sequence and a next exercise.
- Projects →
- Use the pieces together. Follow a guided notebook from a question to a model and its results.
IN AN EXERCISE
Read, write, check.
- Read the Description. Check the function name, inputs, and example output. Open Theory if the idea is new.
- Edit the starter code. Replace the unfinished part, often
pass, with your implementation. Keep the requested function name. - Select Check. Read any failed test’s message, change your code, and check again. Open one hint at a time when you need help.
- Select Submit when you’re ready. This runs every test, including cases that Check leaves out. A passing result marks the exercise as solved.
- Run
- Executes one code cell so you can see its output. It does not grade your answer.
- Check
- Runs the visible tests against your current code. Use it while you work.
- Submit
- Runs all tests and records an attempt, whether it passes or needs more work.
Check and Submit replay your current cells from top to bottom before testing. Keep any imports and definitions your answer needs in the notebook.
What are cells, Restart, and Reset?
A cell is one block of code. Run it with its Run button or Shift+Enter. On larger screens, Run all executes the cells in order.
Restart clears Python’s variables and outputs while keeping your code. Run your cells again afterward.
Reset replaces your edits with the starter code after confirmation. Use it when you want to start the exercise again.
Check the save status before you leave.
Your code saves after a short pause in typing. The message above the editor tells you whether it is saved or needs attention. “Saved on this device” means a copy is in this browser; keep using the same browser to recover it.
If a save fails, keep the tab open and select Retry save. After reopening an exercise, Restore draft lets you bring back a recovery copy when one is available. Your previous submitted attempts are in the Submissions tab.
Start with Python in your browser.
The first exercise needs no installation. Its first run downloads Python, so it can take a moment. If loading fails, check your connection and use Restart to retry.
What changes when an exercise says PyTorch?
PyTorch exercises offer Google Colab or Your machine. You can come back to these after your first browser exercises.
Google Colab:
- On the exercise, select Get a code, copy it, and select Open in Colab.
- Paste it into CODE under Connect this notebook to mlcode, then run that cell. Wait for the connected message.
- Write your solution between Connect and Grade. Run Grade this notebook to test and submit the current code.
- Wait for “recorded on mlcode,” then return to the exercise. Your attempt appears in Submissions.
Keep your notebook open if saving fails and retry Grade. Codes last three hours; Get a new code on the exercise and rerun Connect if yours expires. Save a copy in Drive if you want to keep the whole notebook.
Your machine: connect your own Python runtime using the setup instructions on the exercise. This runs code on your computer; choose it when you are comfortable with local Python.
Trouble connecting to Colab?
If Colab says “no backends available,” save a copy of your notebook in Drive and retry later. Colab’s runtime capacity can change; a new mlcode connection code cannot make a runtime available.
These exercises run on CPU, so a GPU is optional. You can also choose Your machine on the exercise and follow its local Python setup instructions.
After your first success
Continue with the next exercise in your practice set, or read the next topic in Learn. To see a whole workflow, try the bike demand project. Each step links back to a small exercise when you want more practice.