Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computational Thinking

Similar presentations


Presentation on theme: "Computational Thinking"— Presentation transcript:

1 Computational Thinking
Thinking Logically Computational Thinking

2 Starter Activity 3 mins What is an Algorithm? Why are they needed?

3 Learning Habits Which ‘Learning Habits’ we will need to make use of to be a success in this lesson? Noticing details Adapting : Reflecting and making changes Reasoning: Thinking rigorously, methodically and giving explanations. Empathising… …with feelings and views Effective use of time Questioning: Asking questions to get below the surface Listening… …to understand Imagining… …how things could be and seeing a range of possibilities Distilling… …what you have learnt and what you need to learn Collaboration: Working effectively with others Meta Learning: Talking about how you have been learning Imitation: Picking up good habits from others Independence: Working effectively alone Managing distractions… …and sustaining concentration Capitalising: Using resources purposefully Perseverance: Overcoming frustration and difficulty Planning… …your learning in advance

4 Lesson Objectives Lesson Objectives
Understand the importance of logic when devising solutions to problems. Realise the importance of recognising decisions, conditions and possible pathways for a given solution. Literacy – Key Words Algorithm A set of instructions for a software solution – independent of any programming language

5 Thinking Logically What are Algorithms?
Learning Objectives: a)    Identify the points in a solution where a decision has to be taken. b)    Determine the logical conditions that affect the outcome of a decision. c)    Determine how decisions affect flow through a program. What are Algorithms? Algorithms are simply recipes / procedures used to get the intended result. Algorithms state the steps required to get to the desired result. As we learnt earlier, for a problem to be computable, an algorithm must be produced. Creating algorithms is all about thinking logically and so to think computationally is to think in a structured, organised and logical manner. Algorithms are vital to programming. Without one, coding a solution is almost impossible…but with one, coding becomes an easy job (if you know your programming syntax that is!)

6 Thinking Logically Algorithms and Decisions?
Learning Objectives: a)    Identify the points in a solution where a decision has to be taken. b)    Determine the logical conditions that affect the outcome of a decision. c)    Determine how decisions affect flow through a program. Algorithms and Decisions? At the heart of all substantial algorithms are decisions; points at which the program might take a significant direction based on particular conditions. These decisions will either lead to an iteration or a branching point, which may be central to the program’s function. It is therefore vital that the points in the algorithm when decisions occur, are correctly identified.

7 Thinking Logically Decisions and Conditions
Learning Objectives: a)    Identify the points in a solution where a decision has to be taken. b)    Determine the logical conditions that affect the outcome of a decision. c)    Determine how decisions affect flow through a program. Decisions and Conditions In programming, all decisions are based on Boolean conditions…conditions that are either True or False. Take for example the following… IF x > y: OUTPUT “X is greater than Y!” This IF statement is checking to see if the condition x>y is TRUE. If it is then the message with be output, otherwise it will not. When designing an algorithms it is essential that the conditions of various data (at pivotal parts of the program) are correctly analysed, so that the program can function as it is intended.

8 Thinking Logically Decisions and Flow Learning Objectives:
a)    Identify the points in a solution where a decision has to be taken. b)    Determine the logical conditions that affect the outcome of a decision. c)    Determine how decisions affect flow through a program. Decisions and Flow As we have just seen, decisions will occur at points where the program might take a significant direction based on particular conditions. The direction of the program is called ‘FLOW’. To help us plan out the logic for an algorithm we can use pseudocode and/or flowcharts. These can help us visualise the flow of an algorithm for all possible conditions. Example: A central heating system will try to keep the temperature between 2 values (19 and 21) If the temperature falls below 19 It will turn the heating system on If the temperature rises above 21 it will switch the heating system off.

9 Lesson Activity 1 15 mins A piece of banking software contains the function GetAmountWanted. A description of this function is given below. • It prompts the user to input the amount to withdraw. • The amount input by the user is checked to make sure that it can be dispensed in £10 notes. • If this is possible, the function returns the amount input by the user. • If it is not possible, the user is given the option to input a different amount or cancel. If the user chooses to cancel, the function returns the number -1. Write an algorithm, in pseudo-code or as a flowchart, for this function .

10 Lesson Activity 1 – Expected Logic

11 Lesson Activity 2 Complete the ‘Past Exam Question’ booklet.
30 mins Complete the ‘Past Exam Question’ booklet. Remember to use your problem solving skills. Think logically!

12 Lesson Activity 2 – Answers


Download ppt "Computational Thinking"

Similar presentations


Ads by Google