python programming week 6 - tuesday. what’s an algorithm?
TRANSCRIPT
![Page 1: PYTHON PROGRAMMING Week 6 - Tuesday. WHAT’S AN ALGORITHM?](https://reader036.vdocuments.site/reader036/viewer/2022082611/56649ef65503460f94c0a8ee/html5/thumbnails/1.jpg)
PYTHON PROGRAMMING
Week 6 - Tuesday
![Page 2: PYTHON PROGRAMMING Week 6 - Tuesday. WHAT’S AN ALGORITHM?](https://reader036.vdocuments.site/reader036/viewer/2022082611/56649ef65503460f94c0a8ee/html5/thumbnails/2.jpg)
WHAT’S AN ALGORITHM?
https://www.youtube.com/watch?v=6hfOvs8pY1k
![Page 3: PYTHON PROGRAMMING Week 6 - Tuesday. WHAT’S AN ALGORITHM?](https://reader036.vdocuments.site/reader036/viewer/2022082611/56649ef65503460f94c0a8ee/html5/thumbnails/3.jpg)
LAST WEEK
Functions Defining functions Parameters Why bother?
Algorithms Designing algorithms Stepwise refinement
![Page 4: PYTHON PROGRAMMING Week 6 - Tuesday. WHAT’S AN ALGORITHM?](https://reader036.vdocuments.site/reader036/viewer/2022082611/56649ef65503460f94c0a8ee/html5/thumbnails/4.jpg)
REMINDERS
Pen portraits – Bradley, Malik
Update targets based on assignment and check existing targets John to go through targets individually
Elvis – set up email on Edmodo
Bradley – assignment 1
MT2 – Cris, Bethany
![Page 5: PYTHON PROGRAMMING Week 6 - Tuesday. WHAT’S AN ALGORITHM?](https://reader036.vdocuments.site/reader036/viewer/2022082611/56649ef65503460f94c0a8ee/html5/thumbnails/5.jpg)
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
![Page 6: PYTHON PROGRAMMING Week 6 - Tuesday. WHAT’S AN ALGORITHM?](https://reader036.vdocuments.site/reader036/viewer/2022082611/56649ef65503460f94c0a8ee/html5/thumbnails/6.jpg)
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….
![Page 7: PYTHON PROGRAMMING Week 6 - Tuesday. WHAT’S AN ALGORITHM?](https://reader036.vdocuments.site/reader036/viewer/2022082611/56649ef65503460f94c0a8ee/html5/thumbnails/7.jpg)
ALGORITHM DESIGN
Top down design – hierarchy chart for quadratic equation solver Activity – Topic 1.2
Stepwise refinement Activity – sum and average
![Page 8: PYTHON PROGRAMMING Week 6 - Tuesday. WHAT’S AN ALGORITHM?](https://reader036.vdocuments.site/reader036/viewer/2022082611/56649ef65503460f94c0a8ee/html5/thumbnails/8.jpg)
PRACTICAL
Codecademy: Functions
Plus Exercises Challenges
![Page 9: PYTHON PROGRAMMING Week 6 - Tuesday. WHAT’S AN ALGORITHM?](https://reader036.vdocuments.site/reader036/viewer/2022082611/56649ef65503460f94c0a8ee/html5/thumbnails/9.jpg)
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.
![Page 10: PYTHON PROGRAMMING Week 6 - Tuesday. WHAT’S AN ALGORITHM?](https://reader036.vdocuments.site/reader036/viewer/2022082611/56649ef65503460f94c0a8ee/html5/thumbnails/10.jpg)
TOMORROW
More on algorithms
Functions – practice
Assignment 2
![Page 11: PYTHON PROGRAMMING Week 6 - Tuesday. WHAT’S AN ALGORITHM?](https://reader036.vdocuments.site/reader036/viewer/2022082611/56649ef65503460f94c0a8ee/html5/thumbnails/11.jpg)
HOMEWORK
Read through Topic 1.2 and make some notes