PYTHON PROGRAMMING Week 6 - Tuesday
WHAT’S AN ALGORITHM?
LAST WEEK Functions Defining functions Parameters Why bother? Algorithms Designing algorithms Stepwise refinement
REMINDERS Pen portraits – Bradley, Malik Update targets based on assignment and check existing targets John to go through targets individually Elvis – set up on Edmodo Bradley – assignment 1 MT2 – Cris, Bethany
TODAY Algorithms Solve problems using top down development and stepwise refinement Python Writing functions with and without parameters Calling functions with arguments Some library/built in functions
ALGORITHM – LARGEST OF THREE NUMBERS From homework: Find and display the largest of three numbers entered through the keyboard. Solve this using the four major steps method. (Taken from textbook p. 22) Class activity – get an algorithm on the IWB we are ALL happy with! Now write the program….
ALGORITHM DESIGN Top down design – hierarchy chart for quadratic equation solver Activity – Topic 1.2 Stepwise refinement Activity – sum and average
PRACTICAL Codecademy: Functions Plus Exercises Challenges
RECAP What is top down design? What is stepwise refinement? What are the four major steps used in computer based problem solving? What is the difference between and argument and a parameter.
TOMORROW More on algorithms Functions – practice Assignment 2
HOMEWORK Read through Topic 1.2 and make some notes