Beginner · Lesson 5 of 12

Making decisions

A conditional chooses an action based on a true-or-false expression. Think about the boundary: does a score of exactly 10 belong in the first branch? Test values below, at, and above that boundary.

Try it for yourself

Run the example, then change one thing and see what happens.

13px
main.pyYour ideas, in code.
Loading your editor…
Run your code to see the output here.
Ready to buildUTF-85 lines

Expected output

Ready for the next step!

Make it your own

Change the score and test both branches.

A quick check

Which habit helps when learning making decisions?

PreviousNext lesson