Skip to main content
🐍 Python Basics 🐍

A Little Math βœ–οΈ

Computers are great at math. Python uses these symbols:

  • + add
  • - subtract
  • * multiply
  • / divide

The * (star) means multiply:

3 * 4   # 12
5 * 5   # 25

Your task

Write rectangle_area(width, height) that returns the area β€” that's width * height.

⚑ 25 XP

🧱 Code blocks

Drag a block into the editor, or tap it to drop it in where your cursor is. Add them in order to build your answer.

solution.pyRuns in your browser (Pyodide)
Loading editor…
Tests2 to pass
area of 3x4 is 12
area of 5x5 is 25

Run your code to check these.