If statements!

[vocab] condition

M. Lim
Intro to Programming
1 min readJan 26, 2018

--

→ Lab Assignment: “What day is it?” on repl.it

[demo: if-elif-else.py]

A condition is a test that returns either True or False. In an if statement, the condition determines which path a program will take. If the condition is true, the program will execute any instructions that are indented below the if statement. If the condition is false, the program will move on to the next set of instructions.

Image from pythonroom.com

--

--