PyAI Learn Türkçe

Module 2

Making decisions

Comparison, if/elif/else, and/or/not

When you finish this module you can say:

I can make my program follow different paths depending on a condition.

By the end of this module you'll be able to write a rule-based chat bot from scratch that replies differently depending on the user's message.

Start

Lessons

5 lessons · ≈ 45 min

  1. True or false?8 min
  2. if / else and indentation9 min
  3. The elif chain8 min
  4. and, or, not8 min
  5. Project: Rule-based bot v212 min · project

Practice exercises

Short writing exercises, independent of the lessons: Go to the exercises

  1. Password gate
  2. School day?
  3. Yes, YES, yes