PYTHON PROGRAMMING Week 5 - Tuesday
THE FRIENDSHIP ALGORITHM Note the infinite loop!
LAST WEEK Conditionals and control flow
REMINDERS Key Terms & Concepts – weeks 1 & 2 Print out programs and annotate them
TODAY Algorithms What is an algorithm? How to write a simnple algorithm Python Writing functions with and without parameters How to call functions Some library/built in functions
SIMPLE FUNCTION What does it do? Note We can call it from IDLE We can call it from another program There is an existing functions that does this – max() We can easily set up our own libraries of functions
ALGORITHM DESIGN Making a sandwich
ALGORTHM DESIGN Making Tea
PRACTICAL Codecademy: Conditionals and Control Flow Plus Exercises Challenges
RECAP What is an algorithm? What is a function? A parameter? How can functions help us write complex programs?
TOMORROW More on algorithms approaches to writing them why functions are our friends Functions – practice Mastery Task 2
HOMEWORK Tomorrow!