Part 2 · Section 03

Project 1

Time to put the sequence protocol to work. In this project you’ll model regular convex polygons (all sides equal, all angles equal) as an immutable class with computed geometric properties, and then build a custom, read-only sequence of such polygons that supports full indexing and slicing.

The math is light (a little trigonometry, all formulas are given), and the emphasis is on design: computed properties, immutability, rich comparisons, delegation, and writing tests as you go.

In this project you’ll practice:

Lectures

  1. 01Project Description✓
  2. 02Project Solution - Goal 1✓
  3. 03Project Solution - Goal 2✓

Practice: quiz & exercises

7 quiz questions · 3 coding exercises

Go to practice →