WJEC GCSE Computer Science

Slides:



Advertisements
Similar presentations
COMPUTER PROGRAMMING I Understand Problem Solving Tools to Design Programming Solutions.
Advertisements

Algorithms and Problem Solving
Clearly Visual Basic: Programming with Visual Basic 2008 Chapter 9 Decisions, Decisions, Decisions.
BBS Yapısal Programlama (Structured Programming)1 From problem to program In “real world”… Problem in Natural language Top Down Design in pseudo-code.
Chapter 3 Planning Your Solution
Review Algorithm Analysis Problem Solving Space Complexity
PRE-PROGRAMMING PHASE
ALGORITHMS AND FLOW CHARTS 1 Adapted from the slides Prepared by Department of Preparatory year Prepared by: lec. Ghader Kurdi.
Algorithm & Flowchart.
Chapter 1 Pseudocode & Flowcharts
Adapted from slides by Marie desJardins
DCT 1123 PROBLEM SOLVING & ALGORITHMS INTRODUCTION TO PROGRAMMING.
PROGRAMMING, ALGORITHMS AND FLOWCHARTS
Algorithmic Problem Solving CMSC 201 Adapted from slides by Marie desJardins (Spring 2015 Prof Chang version)
Computer Programming TCP1224 Chapter 2 Beginning the Problem-Solving Process.
Describe the Program Development Cycle. Program Development Cycle The program development cycle is a series of steps programmers use to build computer.
By the end of this session you should be able to...
Practice and Evaluation. Practice Develop a java class called: SumCalculator.java which computes a sum of all integer from 1 to 100 and displays the result.
Software Life Cycle What Requirements Gathering, Problem definition
Chapter 2: General Problem Solving Concepts
Program Planning and Design. What is Program Planning and Design? Program planning and design is simply knowing what you want to do and how you want to.
Dale Roberts 1 Program Control - Algorithms Department of Computer and Information Science, School of Science, IUPUI CSCI N305.
1 Program Planning and Design Important stages before actual program is written.
Sequencing The most simple type of program uses sequencing, a set of instructions carried out one after another. Start End Display “Computer” Display “Science”
Structured Programming (4 Credits)
Algorithms and Pseudocode
Learning Objective To be able to… Understand flow chart symbols Complete and correct flow chart algorithms Create a program based on a flow chart.
Flow Charts And Pseudo Codes Grade 12. An algorithm is a complete step-by- step procedure for solving a problem or accomplishing a task.
Program Design & Development EE 201 C7-1 Spring
 Problem Analysis  Coding  Debugging  Testing.
Algorithms and Flowcharts
PYTHON PROGRAMMING Year 9. Objective and Outcome Teaching Objective Today we will look at conditional statements in order to understand how programs can.
Learning outcomes 5 Developing Code – Using Flowcharts
Understand Problem Solving Tools to Design Programming Solutions
A451 Theory – 7 Programming 7A, B - Algorithms.
Programming Languages
PROGRAM CONTROL STRUCTURE
Pseudocode Upsorn Praphamontripong CS 1110 Introduction to Programming
Algorithms An algorithm is a sequence of steps written in the form of English phrases that specific the tasks that are performed while solving the problem.It.
Introduction To Flowcharting
Numbering System TODAY AND TOMORROW 11th Edition
2.0 Problem Solving PROGRAM DESIGN
Algorithm Algorithm is a step-by-step procedure or formula or set of instruction for solving a problem Its written in English language or natural language.
Algorithm and Ambiguity
Unit# 9: Computer Program Development
Program Control using Java - Theory
Introduction to pseudocode
Algorithms & Pseudocode
For -G7 programing language Teacher / Shamsa Hassan Alhassouni.
MSIS 655 Advanced Business Applications Programming
1) C program development 2) Selection structure
Global Challenge Night Sensor Lesson 2.
Global Challenge Night Sensor Lesson 2.
Chapter 2- Visual Basic Schneider
Global Challenge Night Sensor Lesson 2.
Global Challenge Night Sensor Lesson 2.
Global Challenge Night Sensor Lesson 2.
Algorithm and Ambiguity
Global Challenge Night Sensor Lesson 2.
Software Development Process
Global Challenge Night Sensor Lesson 2.
Global Challenge Night Sensor Lesson 2.
Click to add Text Computers & Instructions. Computers are given instructions in the form of computer programs that are created through the development.
Flowcharts and Pseudo Code
Global Challenge Night Sensor Lesson 2.
COMPUTATIONAL THINKING COMPUTATIONAL THINKING IN PROGRAMMING
Global Challenge Night Sensor Lesson 2.
Global Challenge Night Sensor Lesson 2.
Programming Logic and Design Eighth Edition
Introduction to Programming
Presentation transcript:

WJEC GCSE Computer Science Unit 1 Algorithms

Objectives To demonstrate an understanding of algorithms by: Interpreting Algorithms and “Dry Running” simple algorithms Describing the different Data Structures required in an algorithm Use Pseudocode and Flow charts to represent solutions to problems Complete, Test, and Correct algorithms

Algorithms Computer programs are usually written to solve a problem and an algorithm is a set of step-by-step rules, written for a computer, that explain how the problem is to be solved. There are two methods that are commonly used to describe algorithms – pseudo code and flowcharts.

Pseudo Code Pseudo code looks like a programming language, but it isn't. It's a cross between English and a generic-looking programming language. It is useful for some, because it is a halfway point between describing the program in English and having a complete program written in a language such as Visual Basic, Java or Python.

Pseudo Code A pseudo code algorithm for calculating the cost of a purchase at a till might be as follows: INPUT price INPUT quantity total = price * quantity OUTPUT total

Pseudocode: Component 2 Skills In your component 2 exam you need to be able to: Calculate the total Input data using the right data type e.g. Total = Total + Number Output “Enter a score” Input Score as Integer Calculate the Average Average = Total / HowMany Repeat an instruction a user inputted amount of times: Output Messages before an input Output “How many things are there?” Input HowMany as integer For i 1 to HowMany: Indent the repeated code! Output the information at the end of the algorithm Calculate the Maximum Output “Input number” Output “The total is” + Total Input number as integer Output “The maximum is” + Maximum If number > Maximum: Output “The minimum is” + Minimum Maximum = number Output “The Average is” + Average Calculate the Minimum If number > Minimum: Minimum = number

Flowcharts A flowchart does the same job as pseudo code in defining an algorithm, but it is a diagrammatical representation.

Flowcharts A flowchart does the same job as pseudo code in defining an algorithm, but it is a diagrammatical representation.

Workbook Complete section 6 Q1

Sequence Sequence is when instructions in an algorithm each need to be executed only once, and in the order in which they are written.

Selection Selection is when one sequence of instructions or another, but not both, is executed. The sequence that is executed will depend on what happened in earlier instructions. The following example either adds £10 or £5, depending on whether an adult or a child is paying to get into an attraction. Words such as IF mean that selection is taking place.

Selection The diamond shape is a decision box, which asks a question (the answers being written along the arrows), determining which path the program should take next.

Iteration Iteration takes place when one or more instructions is executed more than once. Iteration is also known as repetition. Iteration is taking place when the program code (or pseudo code) contains the words LOOP, FOR, WHILE or REPEAT. The following algorithm might be used in an online system for ordering pizza:

Iteration

Workbook Complete section 6 Q2-6