Computing at SJL Algorithms Flowcharts and Pseudocode Student

  • Slides: 12
Download presentation
Computing at SJL Algorithms: Flowcharts and Pseudocode Student Shared > ICT > Year 9

Computing at SJL Algorithms: Flowcharts and Pseudocode Student Shared > ICT > Year 9 > Social Networking

Computing at SJL Lesson Objectives § To know what an algorithm is and why

Computing at SJL Lesson Objectives § To know what an algorithm is and why these are so important § To be able to produce flow diagrams to solve problems § To know what pseudocode is and be able to interpret basic pseudocode Student Shared > ICT > Year 9 > Social Networking

Computing at SJL Algorithm Do you remember what an algorithm is? An algorithm is

Computing at SJL Algorithm Do you remember what an algorithm is? An algorithm is a series of steps to solve a problem. Computer scientists turn algorithms into programs – series of instructions for computers to follow to solve a problem. Without computers, could we have algorithms? Without algorithms, could we have computers? Student Shared > ICT > Year 9 > Social Networking

Computing at SJL Video The friendship algorithm (Optional if have Internet access) Programmers often

Computing at SJL Video The friendship algorithm (Optional if have Internet access) Programmers often represent the stages of their algorithm as a flowchart before they write their programs. This is a skill you are going to work on today. Student Shared > ICT > Year 9 > Social Networking

Computing at SJL Flowcharts and Pseudocode It is very important for programmers to plan

Computing at SJL Flowcharts and Pseudocode It is very important for programmers to plan their algorithms before writing them in code to make sure the know what they are making and any problems can be identified. Two ways of doing this are: • Drawing flowcharts • Writing pseudocode This is what you are going to do today Student Shared > ICT > Year 9 > Social Networking

Computing at SJL Task 1: Key Words Complete task 1 in the workbook filling

Computing at SJL Task 1: Key Words Complete task 1 in the workbook filling in the missing words: Algorithm – a series of ______ to solve a ______ Program – a series of ______ to be followed by a ______ to solve a ______. Student Shared > ICT > Year 9 > Social Networking

Computing at SJL Task 2: Flowcharts Complete the flowcharts worksheet. After you complete a

Computing at SJL Task 2: Flowcharts Complete the flowcharts worksheet. After you complete a task use the answers provided to check your solution There’s an extension task on the worksheet for you to complete if you have found this straight manageable. Student Shared > ICT > Year 9 > Social Networking

Computing at SJL Pseudocode • Don’t worry – it sounds more confusing than it

Computing at SJL Pseudocode • Don’t worry – it sounds more confusing than it is! • Does anyone know what pseudo means at the start of a word? • HINT: What is a pseudonym? Student Shared > ICT > Year 9 > Social Networking

Computing at SJL Pseudocode • Pseudocode means “fake code”. It looks like code, but

Computing at SJL Pseudocode • Pseudocode means “fake code”. It looks like code, but it is written so that humans understand it, rather than computers. • Programmers use pseudocode to plan their algorithms. It can be understood by any programmer. • The algorithms can then be coded in a variety of programming languages. Student Shared > ICT > Year 9 > Social Networking

Computing at SJL Example Give the program a name that describes what it will

Computing at SJL Example Give the program a name that describes what it will do Instructions one after the other (“in sequence”) Example of a loop Example of a decision Program must end with “end” Student Shared > ICT > Year 9 > Social Networking

Computing at SJL Task 3: Pseudocode Complete the pseudocode worksheet you are given. Extension:

Computing at SJL Task 3: Pseudocode Complete the pseudocode worksheet you are given. Extension: write your own pseudocode for one or more of the following programs: • Writing “hello world” to the screen. • Asking the user their name and then saying “hello, [name]” • Asking the user whether they have computing today. If yes, they are told “today is a happy day”. If no, they are told “today is a sad day”. • Asking the user for the length and height of a triangle and then calculating the area. Student Shared > ICT > Year 9 > Social Networking

Computing at SJL Plenary Student Shared > ICT > Year 9 > Social Networking

Computing at SJL Plenary Student Shared > ICT > Year 9 > Social Networking