DO NOW – Decompose a Problem

Slides:



Advertisements
Similar presentations
JAVA Coursework (the same for 2A and 2B). Fundamental Information The coursework is 30 marks in your O’Level = 15% of the exam Must be word processed.
Advertisements

1.4 Programming Tools Flowcharts Pseudocode Hierarchy Chart
Chapter 1 - An Introduction to Computers and Problem Solving
Chapter 2 - Problem Solving
Chapter 2 - Problem Solving
LECTURE 1 CMSC 201. Overview Goal: Problem solving and algorithm development. Learn to program in Python. Algorithm - a set of unambiguous and ordered.
Chapter 3 Planning Your Solution
Review Algorithm Analysis Problem Solving Space Complexity
The Project AH Computing. Functional Requirements  What the product must do!  Examples attractive welcome screen all options available as clickable.
DCT 1123 PROBLEM SOLVING & ALGORITHMS INTRODUCTION TO PROGRAMMING.
Introduction CSE 1310 – Introduction to Computers and Programming
Looping While-continue.
Python Programming Using Variables and input. Objectives We’re learning to build functions and to use inputs and outputs. Outcomes Build a function Use.
Computational Thinking – Lesson 3 Lesson Objective To be able to construct an algorithm and flowchart for a given problem.
Flowcharts. Problem Solving Computer programs are written to solve problems or perform tasks Programmers translate the solutions or tasks into a language.
1 Programming Tools Flowcharts Pseudocode Hierarchy Chart Direction of Numbered NYC Streets Algorithm Class Average Algorithm.
Structured Programming (4 Credits)
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
CMPSC 16 Problem Solving with Computers I Spring 2014 Instructor: Tevfik Bultan Lecture 4: Introduction to C: Control Flow.
Course Aims This course will help you understand the latest technologies & how they work. You will lean how to develop computer programs to solve problems.
Progression in KS3/4 Algorithms MONDAY 30 TH NOVEMBER SUE SENTANCE.
| MSC 8102:PROGRAMMING CONCEPTS By Vincent Omwenga, PhD. 1.
CSE 110: Programming Language I Matin Saad Abdullah UB 404.
Algorithms and Flowcharts
Programming revision Revision tip: Focus on the things you find difficult first.
Chapter 2 Writing Simple Programs
GCSE COMPUTER SCIENCE Practical Programming using Python
GCSE Computer Science Information.
Writing algorithms Introduction to Python.
Topic: Introduction to Computing Science and Programming + Algorithm
3.1 Fundamentals of algorithms
A451 Theory – 7 Programming 7A, B - Algorithms.
INTRODUCTION TO PROBLEM SOLVING
Software Development Expansion of topics page 28 in Zelle
Unit 3: ALGORITHMS AND FLOWCHARTS
Introduction to Computing
Algorithms and Flowcharts
Chapter 5: Control Structure
Teaching design techniques to design efficient solutions to problems
Lecture 2 Introduction to Programming
Introduction CSE 1310 – Introduction to Computers and Programming
Algorithm and Ambiguity
Control Structure Senior Lecturer
Unit# 9: Computer Program Development
Problem Solving Techniques
Algorithms & Pseudocode
For -G7 programing language Teacher / Shamsa Hassan Alhassouni.
Global Challenge Night Sensor Lesson 2.
Global Challenge Night Sensor Lesson 2.
Global Challenge Night Sensor Lesson 2.
Global Challenge Night Sensor Lesson 2.
Global Challenge Night Sensor Lesson 2.
Global Challenge Night Sensor Lesson 2.
Learning Intention I will learn about programming using selection (making choices) with one condition.
Global Challenge Night Sensor Lesson 2.
Global Challenge Night Sensor Lesson 2.
PYTHON: BUILDING BLOCKS Inputs & Outputs
PYTHON: BUILDING BLOCKS Sequencing & Selection
TEST CORRECTION PROCEDURES
Global Challenge Night Sensor Lesson 2.
COMPUTATIONAL THINKING COMPUTATIONAL THINKING IN PROGRAMMING
Global Challenge Night Sensor Lesson 2.
Learning Intention I will learn about the different types of programming errors.
Global Challenge Night Sensor Lesson 2.
Therapies. Interpreting and writing algorithms
Learning Intention I will learn about the standard algorithm for input validation.
WJEC GCSE Computer Science
CMPT 120 Lecture 2 - Introduction to Computing Science – Problem Solving, Algorithm and Programming.
Algorithms For use in Unit 2 Exam.
Primary School Computing
Presentation transcript:

DO NOW – Decompose a Problem In pairs, discuss this problem. How would you solve it? Write your ideas in the top space on the sheet. A scientist has measured the temperature every day for a week. She now wants to type these into a computer program and receive a report of the average temperature and highest temperature.

Meet the NEA Understand the Non-Examined Assessment (Grade 3) Decompose a problem into steps and draw a flowchart (4-5) Write Pseudocode and Python code (6-7)

GCSE Big Picture Exams Paper 1 - 50 % (1 h 40) "Principles of Computer Science" – All six topics Paper 2 - 50% "Application of Computational Thinking" – Problem Solving and Programming Project (Non-Examined Assessment) Paper 3 – not marked A programming project running for 20 hours. You will work in this room, in exam conditions, with little help from the teacher. This will test your skills in Problem Solving and Programming.

The Project (aka NEA) The project consists of 4 stages: Analysis Introduction, Requirements, Decomposition, Subtasks Design Algorithms (flowcharts or pseudocode) Initial test plan Implementation Python programs Updated test table debugging evidence Testing, refining and evaluation

Analysis We need to decompose into input, process and output. We need to decide how to store the data, what data structure? Input, Process, Output, Data spells IPOD! A scientist has measured the temperature every day for a week. She now wants to type these into a computer program and receive a report of the average temperature and highest temperature.

Analysis stage: Decomposition A scientist has measured the temperature every day for a week. She now wants to type these into a computer program and receive a report of the average temperature and highest temperature. Discuss in pairs again: What are the inputs? What processes do we need? What are the outputs? How will we store the data? 7 temperatures calculate average temp and calculate highest temp average temp and highest temp in a list e.g. temp=[35,24,26…]

Design stage: Algorithms A scientist has measured the temperature every day for a week. She now wants to type these into a computer program and receive a report of the average temperature and highest temperature. Design stage: Algorithms We now need to design an algorithm. We can do this in a flowchart or pseudocode or both. The algorithm should input the temperatures, calculate average and highest temperature and output the results. In pairs, design a flowchart now. Extension: attempt the pseudocode

Design Stage: Flowchart A scientist has measured the temperature every day for a week. She now wants to type these into a computer program and receive a report of the average temperature and highest temperature. Design Stage: Flowchart This is a simple flowchart for the algorithm. NB there is no exact, correct answer for a flowchart, as long as it makes sense and explains the algorithm well. For example we could have had seven separate Input shapes, or a loop to input the temps that runs 7 times. We could have had two process boxes, one for each calculation. As long as the flowchart is clear and accurate. Now write the pseudocode

Design: Pseudocode Now code this program in Python A scientist has measured the temperature every day for a week. She now wants to type these into a computer program and receive a report of the average temperature and highest temperature. Design: Pseudocode FOR i FROM 0 TO 6 DO RECEIVE temp[i] FROM (REAL) KEYBOARD END FOR SET average TO SUM(temp) / 7 SET highest TO MAX(temp) SEND average, highest TO DISPLAY RECEIVE temp[0] FROM (REAL) KEYBOARD RECEIVE temp[1] FROM (REAL) KEYBOARD … RECEIVE temp[6] FROM (REAL) KEYBOARD Now code this program in Python

Implementation FOR i FROM 0 TO 6 DO A scientist has measured the temperature every day for a week. She now wants to type these into a computer program and receive a report of the average temperature and highest temperature. Implementation FOR i FROM 0 TO 6 DO RECEIVE temp[i] FROM (REAL) KEYBOARD END FOR SET average TO SUM(temp) / 7 SET highest TO MAX(temp) SEND average, highest TO DISPLAY for i in range(6): temp[i] = float(input("temp?")) average = sum(temp) highest = max(temp) print("highest =",highest," average =",average)

Implementation FOR i FROM 0 TO 6 DO A scientist has measured the temperature every day for a week. She now wants to type these into a computer program and receive a report of the average temperature and highest temperature. Implementation FOR i FROM 0 TO 6 DO RECEIVE temp[i] FROM (REAL) KEYBOARD END FOR SET average TO SUM(temp) / 7 SET highest TO MAX(temp) SEND average, highest TO DISPLAY temp=[0,0,0,0,0,0,0] for i in range(7): temp[i] = float(input("temp?")) average = sum(temp) / 7 highest = max(temp) print("highest =",highest," average =",average)

Testing How do we know this works? A scientist has measured the temperature every day for a week. She now wants to type these into a computer program and receive a report of the average temperature and highest temperature. Testing How do we know this works? We write a test plan. What would that look like? Can you think of anything else we should test? negative numbers, fractions, two numbers the same etc. and in each case the output should be correct. for i in range(6): temp[i] = float(input("temp?")) average = sum(temp) highest = max(temp) print("highest =",highest," average =",average) I will test with the following data: 25,26,27,28,29,30,31 I expect to get an average of 28 and a highest of 31

Analysis Design Implementation Testing Plenary In your book, summarise the Project task and explain each stage in a sentence.