Introduction to pseudocode

Slides:



Advertisements
Similar presentations
CS107 Introduction to Computer Science Lecture 3, 4 An Introduction to Algorithms: Loops.
Advertisements

CS107 Introduction to Computer Science Lecture 2.
CS107: Introduction to Computer Science Lecture 2 Jan 29th.
Loops (Part 1) Computer Science Erwin High School Fall 2014.
CS107 Introduction to Computer Science Loops. Instructions Pseudocode Assign values to variables using basic arithmetic operations x = 3 y = x/10 z =
Chapter 2: Algorithm Discovery and Design
CS107 Introduction to Computer Science Lecture 2.
Review Algorithm Analysis Problem Solving Space Complexity
Adapted from slides by Marie desJardins
CSE 102 Introduction to Computer Engineering What is an Algorithm?
Problem Solving Techniques. Compiler n Is a computer program whose purpose is to take a description of a desired program coded in a programming language.
1 09/20/04CS150 Introduction to Computer Science 1 Let ’ s all Repeat Together.
An Introduction to Programming with C++ Sixth Edition Chapter 7 The Repetition Structure.
Control Structures CPS120: Introduction to Computer Science Lecture 5.
CSCI-100 Introduction to Computing
Introduction to Loops For Loops. Motivation for Using Loops So far, everything we’ve done in MATLAB, you could probably do by hand: Mathematical operations.
End of unit assessment Challenge 1 & 2. Course summary So far in this course you have learnt about and used: Syntax Output to screen (PRINT) Variables.
Intro to Programming Web Design ½ Shade Adetoro. Programming Slangs IDE - Integrated Development Environment – the software in which you develop an application.
ITEC 109 Lecture 11 While loops. while loops Review Choices –1 st –2 nd to ?th –Last What happens if you only use ifs? Can you have just an else by itself?
Algorithm Discovery and Design Objectives: Interpret pseudocode Write pseudocode, using the three types of operations: * sequential (steps in order written)
Algorithms and Pseudocode
Flow Control in Imperative Languages. Activity 1 What does the word: ‘Imperative’ mean? 5mins …having CONTROL and ORDER!
CS 101 – Oct. 7 Solving simple problems: create algorithm Structure of solution –Sequence of steps (1,2,3….) –Sometimes we need to make a choice –Sometimes.
Pseudocode. Algorithm A procedure for solving a problem in terms of the actions to be executed and the order in which those actions are to be executed.
Algorithms and Flowcharts
Algorithms and Pseudocode CS Principles Lesson Developed for CS4 Alabama Project Jim Morse.
Programming Logic and Design Fourth Edition, Introductory Chapter 2 Understanding Structure.
Programming revision Revision tip: Focus on the things you find difficult first.
Writing algorithms Introduction to Python.
REPETITION CONTROL STRUCTURE
EasyCode Foundations Vocabulary Terms.
Introduction to Algorithms
Pseudocode Upsorn Praphamontripong CS 1110 Introduction to Programming
Chapter 5: Control Structure
Introduction To Flowcharting
Algorithm and Ambiguity
Computer Science 101 While Statement.
Chapter 4 LOOPS © Bobby Hoggard, Department of Computer Science, East Carolina University / These slides may not be used or duplicated without permission.
CPS120: Introduction to Computer Science
Please use speaker notes for additional information!
Intro to Nested Looping
Algorithms & Pseudocode
Unary Operators ++ and --
For -G7 programing language Teacher / Shamsa Hassan Alhassouni.
Understanding the Three Basic Structures
Global Challenge Night Sensor Lesson 2.
Coding Concepts (Basics)
Global Challenge Night Sensor Lesson 2.
Global Challenge Night Sensor Lesson 2.
Global Challenge Night Sensor Lesson 2.
Global Challenge Night Sensor Lesson 2.
Algorithm and Ambiguity
Introduction to Algorithms - 1
Let’s all Repeat Together
Global Challenge Night Sensor Lesson 2.
ICT Programming Lesson 3:
Global Challenge Night Sensor Lesson 2.
Global Challenge Night Sensor Lesson 2.
Flowcharts and Pseudo Code
ICT Gaming Lesson 2.
Global Challenge Night Sensor Lesson 2.
Let’s all Repeat Together
FLUENCY WITH INFORMATION TECNOLOGY
Chapter 4: Repetition Structures: Looping
Global Challenge Night Sensor Lesson 2.
Global Challenge Night Sensor Lesson 2.
Introduction to Python
LOOPS The loop is the control structure we use to specify that a statement or group of statements is to be repeatedly executed. Java provides three kinds.
WJEC GCSE Computer Science
Presentation transcript:

Introduction to pseudocode Most programs are developed using programming languages. These languages have specific syntax that must be used so that the program will run properly. Pseudocode is not a programming language, it is a simple way of describing a set of instructions that does not have to use specific syntax.

Common pseudocode notations There is no strict set of standard notations for pseudocode, but some of the most widely recognized are: INPUT – indicates a user will be inputting something OUTPUT – indicates that an output will appear on the screen WHILE – a loop (iteration that has a condition at the beginning) FOR – a counting loop (iteration) REPEAT – UNTIL – a loop (iteration) that has a condition at the end IF – THEN – ELSE – a decision (selection) in which a choice is made any instructions that occur inside a selection or iteration are usually indented

USING pseudocode Pseudocode can be used to plan out programs. Planning a program that asks people what the best subject they take is, would look like this in pseudocode: REPEAT OUTPUT 'What is the best subject you take?' INPUT user inputs the best subject they take STORE the user's input in the answer variable IF answer = 'Computer Science' THEN OUTPUT 'Of course it is!' ELSE OUTPUT 'Try again!' UNTIL answer = 'Computer Science'