Is it positive?
This page needs a recent browser (with SharedArrayBuffer support). Please update Chrome, Edge, Firefox or Safari to the latest version.
This one builds on a lesson you haven't finished yet. Do that lesson first:
Python Basics · Functions →
Is it positive?
A number is positive when it is greater than 0. The test n > 0 is already True or False — you can return it directly.
Difficulty 1/5 · 100 coins + a small bonus on first completion today
Complete is_positive(n): return True when n > 0, else False.
Click Run to see the output here.