Pseudo Code.

Slides:



Advertisements
Similar presentations
ALGORITHMS AND FLOWCHARTS
Advertisements

More on Algorithms and Problem Solving
ALGORITHMS AND FLOWCHARTS
PROBLEM SOLVING TECHNIQUES
CHAPTER 2 GC101 Program’s algorithm 1. COMMUNICATING WITH A COMPUTER  Programming languages bridge the gap between human thought processes and computer.
ALGORITHMS AND FLOWCHARTS
 Control structures  Algorithm & flowchart  If statements  While statements.
INSTRUCTOR: SHIH-SHINH HUANG Windows Programming Using Java Chapter4: Control Statements Part I.
 2002 Prentice Hall. All rights reserved Control Structures 3 control structures –Sequential structure Built into Python –Selection structure The.
Introduction to working with Loops  2000 Prentice Hall, Inc. All rights reserved. Modified for use with this course. Introduction to Computers and Programming.
1 Outline 4.1 Introduction 4.2 Algorithms 4.3 Pseudocode 4.4 Control Structures 4.5 if Single-Selection Statement 4.6 if else Selection Statement 4.7 while.
A High-Level Model For Software Development
Structured Program Development in C
 2002 Prentice Hall. All rights reserved. 1 Chapter 3 – Control Structures Outline 3.1 Introduction 3.2 Algorithms 3.3 Pseudocode 3.4Control Structures.
ALGORITHMS AND FLOWCHARTS
The University of Texas – Pan American
PROGRAMMING, ALGORITHMS AND FLOWCHARTS
Algorithms In general algorithms is a name given to a defined set of steps used to complete a task. For example to make a cup of tea you would fill the.
C++ If….Else Statements and Flowcharts October 10, 2007.
Structured Program Development Outline 2.1Introduction 2.2Algorithms 2.3Pseudo code 2.4Control Structures 2.5The If Selection Structure 2.6The If/Else.
CSE 102 Introduction to Computer Engineering What is an Algorithm?
Using Java MINISTRY OF EDUCATION & HIGHER EDUCATION COLLEGE OF SCIENCE AND TECHNOLOGY KHANYOUNIS- PALESTINE.
PSEUDOCODE C Programming Technique – Firdaus-Harun.com.
Coding Design Tools Rachel Gauci. What are Coding Design Tools? IPO charts (Input Process Output) Input- Make a list of what data is required (this generally.
ALGORITHMS AND FLOWCHARTS CSCI 105 – Computer Fluency.
Chapter 3 - Structured Program Development Outline 3.1Introduction 3.2Algorithms 3.3Pseudocode 3.4Control Structures 3.5The If Selection Structure 3.6The.
 2008 Pearson Education, Inc. All rights reserved JavaScript: Control Statements I.
Lecture 4: C/C++ Control Structures Computer Programming Control Structures Lecture No. 4.
Unit 2 – Algorithms & Pseudocode. Algorithms Computer problems solved by executing series of action in order Procedure –The Actions to execute –The Order.
Structured Program Development Angela Chih-Wei Tang ( 唐 之 瑋 ) Department of Communication Engineering National Central University JhongLi, Taiwan 2010.
Flowcharting & Algorithms. Quick. Close your Eyes and Listen You are still sitting in the classroom. However, you have been called to the counselor’s.
 2002 Prentice Hall. All rights reserved. 1 Chapter 4 – Control Structures Part 1 Outline 4.1 Introduction 4.2 Algorithms 4.3 Pseudocode 4.4 Control Structures.
The Hashemite University Computer Engineering Department
Concepts of Algorithms CSC-244 Unit Zero Pseudo code, Flowchart and Algorithm Master Prince Computer College Qassim University K.S.A.
 2003 Prentice Hall, Inc. All rights reserved. 1 Will not cover 4.14, Thinking About Objects: Identifying Class Attributes Chapter 4 - Control Structures.
Examples of Flow Charts Pseudocodes
Think First, Code Second Understand the problem Work out step by step procedure for solving the problem (algorithm) top down design and stepwise refinement.
These Guys? Wait, What? Really?  Branching is a fundamental part of programming  It means taking an action based on decision  The decision is dependent.
ALGORITHMS AND FLOWCHARTS. Why Algorithm is needed? 2 Computer Program ? Set of instructions to perform some specific task Is Program itself a Software.
Algorithms JPC and JWD © 2002 McGraw-Hill, Inc. 2 Algorithms 2 An Algorithm is a finite set of precise instructions for performing a computation or for.
ALGORITHMS AND FLOWCHARTS. A typical programming task can be divided into two phases: Problem solving phase  produce an ordered sequence of steps that.
Lecture 2: Introduction to Programming EEE2108: 공학프로그래밍 서강대학교 전자공학과 2011 학년도 2 학기 - Algorithms and Flowcharts -
Selection Using IF THEN ELSE CASE Introducing Loops.
PYTHON PROGRAMMING Year 9. Objective and Outcome Teaching Objective Today we will look at conditional statements in order to understand how programs can.
Starter What does the following code do?
Program design Program Design Process has 2 phases:
ALGORITHMS AND FLOWCHARTS
Algorithm: procedure in terms of
GC101 Introduction to computers and programs
Programming Languages
while Repetition Structure
Visual Basic I Programming
Chapter 2- Visual Basic Schneider
ALGORITHMS AND FLOWCHARTS
COVERED BASICS ABOUT ALGORITHMS AND FLOWCHARTS
CS111 Computer Programming
Chapter 4: Control Structures
Lecturer CS & IT Department UOS MBDIN
Chapter 4 – Control Structures Part 1
ALGORITHMS AND FLOWCHARTS
ALGORITHMS AND FLOWCHARTS
Algorithms & Pseudocode
Structured Program
Programming in Pseudocode
1) C program development 2) Selection structure
ALGORITHMS AND FLOWCHARTS
Computer Programming.
Chapter 2- Visual Basic Schneider
Introduction to Programming
WJEC GCSE Computer Science
Presentation transcript:

Pseudo Code

What is pseudocode? An artificial and informal language that helps programmers develop algorithms Pseudocode is text based – Plain English The purpose is to elaborate on the algorithmic detail and not just cite an abstraction

What is an 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 A sequence of steps executed to solve the problem

Problem #1 Write the pseudo code such that a program prints “Passed” when a student’s grade is passing and “Failed” when the student’s grade is not passing

Problem #1 Solution Ask the user to enter a grade If the grade is equal or greater than 70 print “passed” Otherwise, if the grade is less than 70 print “failed”

Problem #2 Write the pseudocode for going to Torchy’s Tacos and ordering and eating a ‘Trailer Park’ taco and a coke.

Problem #2 Solution Enter Torchy’s Taco Order a Trailer Park taco and a coke Pay for order Wait for order When called, receive order Sit at table While still hungry, take bite of taco If thirsty take drink of coke When finished Throw away trash Exit

Problem #3 Average the grades of 10 students and print the average

Problem #3 Solution Set total to 0 Set the number of students to 10 Set the gradeCounter to 0 Ask the user to enter 10 grades While gradeCounter is less than or equal to numberOfStudents, ask the user to enter a grade. input all grades and add each grade to the total When finished retriving the grades, set the classAverage to the total divided by the numberOfStudents Print the class average Exit