Overview

Teaching: min
Exercises: 10 min
Questions
  • Can I add assertion statements in my code?

Objectives
  • Learn how to increase the quality of your code with assertions

Adding assertions

Add the following lines after mean age calculation in your Python script:

assert mean_age < 100
assert mean_age > 10 

Commit, push and check out CircleCI.

Do your tests still pass?

Key Points