Programming and Algorithms: Week 3



What are we doing this week?

This week we are going to look at the idea of SELECTION, how to give the users choice in out programs.
First we will look at the IF statements, and then a bit of Boolean logic, and finally the CASE statement.
Moving onto the Python side of things we will look at how to implement SELECTION in Python.

PseudoCode Python Python Logo


Powerpoint: Boolean Logic


Powerpoint: Selection

Powerpoint: Some Common Issues

Selection - The IF Statement

Selection - The CASE Statement
Total running time of videos is 50 minutes.

Sample Code:
SimpleIfStatement * AnotherSimpleIfStatement * AnotherSimpleIfStatementPrints * AnotherSimpleIfStatementPrintsShorter * IsOddOrEven * BiggerOfThree * BiggerOfThreeElif * MultiChoiceQuestion * GetGrade

Python Docs: Control Flow Statements

Learn Python the Hard Way: Else and If

Python for Beginners: If, Elif, Else Statements

Lab #3
Lab #3 is all about checking if what you have learned in the episodes above all makes sense, and if you can use IF statements and the ELIF statement.

Reminder: Running Python Programs


If you have any suggestions, corrections, or comments, please feel free to e-mail me at: