Download presentation
Presentation is loading. Please wait.
Published byKristina Armstrong Modified over 9 years ago
1
PYTHON PROGRAMMING Week 10 – Wednesday
2
TERMS – CHAPTER 1 Write down definitions for these terms: Computation Computability Computing Artificial Intelligence Algorithm Program Abstraction Automation
3
YESTERDAY Glossary program Codecademy – Lists and functions
4
TODAY Use pseudocode for sequence, selection and iteration constructs Write pseudocode solutions to problems Create Python programs for pseudocode
5
PSEUDOCODE INTRODUCTION What is pseudocode? Why use pseudocode? AQA pseudocode guide – website
6
SEQUENCE
7
SELECTION
8
ITERATION
9
EXERCISE Produce pseudocode for the following, check with your tutor and then write the Python code: You need to let the user input a series of numbers For each number tell the user whether or not the number is even Stop the process when the user enters the number -1
10
PSEUDOCODE SOLUTION OUTPUT “Enter first number: ” INPUT number WHILE number <> -1 IF number MOD 2 = 0 THEN OUTPUT “Even” ELSE OUTPUT “Odd” ENDIF OUTPUT “Enter first number: ” INPUT number ENDWHILE
11
HOMEWORK – EXAM QUESTION Pseudocode to Python
12
RECAP What is pseudocode? How to we represent sequence, selection and iteration in pseudocode? How do we represent them using structure diagrams?
13
NEXT WEEK More design work Lists and functions
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.