Data and engineering

Python for data

Real Python, running in your browser, with exercises designed for people who work with data.

units
9
lessons
26
minutes
146
exercises
156

The first unit is free, no credit card required. The other 8 unlock when you buy the course or go Pro. Single course: $12.99, one-time payment.

What's in the course.

From print to pandas, with code that really runs.

9 units, 26 lessons, and about 146 minutes of practice, a few minutes at a time.

Variables, types and text: the foundation for everything that follows.

In this unit, you'll learn to

  • Store values in variables
  • Recognise the int, float, str and bool types
  • Build text with f-strings and string methods

Lessons

  1. Variables and types, unlocked6 exercises · 5 min
  2. Text and f-strings, unlocked6 exercises · 5 min

Try it for real.

Ready to code in Python? Real exercises from this course, solved step by step, exactly as they appear in the app.

156 exercises across 5 types in this course

  • Write Python58
  • Pick the best answer50
  • Fill in the code26
  • Match19
  • Put it in order3

Write Python. Python 3 running in your browser, nothing to install. Write it, run it, see the output.

Your first code

Profit is revenue minus cost. Print the profit rounded to 2 decimal places with round().

revenue = 1250.50 cost = 830.20 print(round(revenue - cost, 2))

Correct. Without round, the result comes out as 420.29999999999995, because decimal numbers are stored approximately. round(value, 2) fixes it for display.

Practice exams for this course

This course prepares you for these exams. Try free questions before you practice in the app.