Algorithms & Pseudocode & Flowcharts

Slides:



Advertisements
Similar presentations
ALGORITHMS AND FLOWCHARTS
Advertisements

Repetition Control Structures School of Business Eastern Illinois University © Abdou Illia, Spring 2003 (Week 9, Friday 3/07/2003)
PSEUDOCODE & FLOW CHART
Chapter 3 IFTHENELSE Control Structure © 2008 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. Marilyn Bohl/Maria Rynn Tools for Structured.
Chapter 2 - Problem Solving
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
Mathematics for Computing Lecture 4: Algorithms and flowcharts Dr Andrew Purkiss-Trew Cancer Research UK
ECE Application Programming
Chapter 2 - Problem Solving
Chapter 1 Pseudocode & Flowcharts
Computer Science 1620 Programming & Problem Solving.
Algorithms. Introduction Before writing a program: –Have a thorough understanding of the problem –Carefully plan an approach for solving it While writing.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
Chapter 3 Planning Your Solution
The Program Design Phases
Chapter 1 Pseudocode & Flowcharts
ALGORITHMS AND FLOWCHARTS
CSC141 Introduction to Computer Programming
Flow Charting. Goals Create Algorithms using Flow Charting procedures. Distinguish between Flow Charting and Pseudocode. Top-Down Design Bottom-up Design.
Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and Elizabeth Drake Chapter 2: Flowcharts.
CPS120 Introduction to Computer Programming The Programming Process.
Flowcharts. Problem Solving Computer programs are written to solve problems or perform tasks Programmers translate the solutions or tasks into a language.
Definition of Terms Software/Programs Programs that directs the operation of a computer system Set of instructions Codes Programming Process of planning,
Chapter 1 Pseudocode & Flowcharts
1 Program Planning and Design Important stages before actual program is written.
Algorithms Java Methods A & AB Object-Oriented Programming and Data Structures Maria Litvin ● Gary Litvin Copyright © 2006 by Maria Litvin, Gary Litvin,
1 Programming Tools Flowcharts Pseudocode Hierarchy Chart Direction of Numbered NYC Streets Algorithm Class Average Algorithm.
1 Overview of Programming Principles of Computers.
Problem-solving with Computers. 2Outline  Computer System  5 Steps for producing a computer program  Structured program and programming  3 types of.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
FLOWCHARTING AND ALGORITHMS
Flowcharts C++ Lab. Algorithm An informal definition of an algorithm is: a step-by-step method for solving a problem or doing a task. Input data A step-by-step.
Program Design & Development EE 201 C7-1 Spring
 Problem Analysis  Coding  Debugging  Testing.
Program design Program Design Process has 2 phases:
COVERED BASICS ABOUT ALGORITHMS AND FLOWCHARTS
Introduction to Computing
Pseudocode Upsorn Praphamontripong CS 1110 Introduction to Programming
Introduction to Computer Programming
ALGORITHMS AND FLOWCHARTS
Chapter 1 Pseudocode & Flowcharts
ALGORITHMS AND FLOWCHARTS
MathMagic: Computational and Mathematical Thinking
CPS120: Introduction to Computer Science
Pseudocode & Flowcharts
Structured Program Development in C
MSIS 655 Advanced Business Applications Programming
Global Challenge Night Sensor Lesson 2.
ALGORITHMS AND FLOWCHARTS
Chapter 2- Visual Basic Schneider
Algorithms & Pseudocode & Flowcharts
Global Challenge Night Sensor Lesson 2.
Chapter 1 Pseudocode & Flowcharts
Introduction to Algorithms and Programming
CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
Global Challenge Night Sensor Lesson 2.
Global Challenge Night Sensor Lesson 2.
Global Challenge Night Sensor Lesson 2.
Global Challenge Night Sensor Lesson 2.
Dr. Nouf Aljaffan Exercise solutions Dr. Nouf Aljaffan
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.
Introduction to Programming
Global Challenge Night Sensor Lesson 2.
Global Challenge Night Sensor Lesson 2.
Global Challenge Night Sensor Lesson 2.
Chapter 1 Introduction to Programming
WJEC GCSE Computer Science
Chapter 1 Pseudocode & Flowcharts
Presentation transcript:

Algorithms & Pseudocode & Flowcharts Dr. Nouf Aljaffan naljaffan@ksu.edu.sa

Objectives Learn how to write an algorithm using Flowchart and Pseudocode Nouf Aljaffan (C) 2018

Stages in Program Development Process 1- Analysis of a problem 2- Create the algorithm 3- Compile the program 4- Execute the program 5- Testing and Debugging the Program Stages in Program Development Process Nouf Aljaffan (C) 2018

(2) Create the algorithm Plan for solution and use basic statements and expression to develop the algorithm Nouf Aljaffan (C) 2018

Computational Thinking https://youtu.be/mUXo-S7gzds Nouf Aljaffan (C) 2018

Computational Thinking 01/08/2019 Computational Thinking Decomposition  Breaking down data, processes, or problems into smaller, manageable parts Pattern Recognition Observing patterns, trends, and regularities in data Abstraction Identifying the general principles that generate these patterns Algorithm Design  Developing the step by step instructions for solving this and similar problems https://community.computingatschool.org.uk/files/8221/original.pdf https://barefootcas.org.uk/wp-content/uploads/2014/10/Computational-thinking-Barefoot-Computing.pdf Nouf Aljaffan (C) 2018 Nouf Aljaffan (C) 2018

What Can a Program Do? Read Input Store data Calculate Write Output Sequence Compare and branch Iterate or Loop What Can a Program Do? Nouf Aljaffan (C) 2018

Sequence Compare and branch Iterate or Loop No Entry Exit false true Entry Exit Test condition p “true” statement a “false” statement a Nouf Aljaffan (C) 2018

Flowchart is a graphical representation of an algorithm. CSC 1101 01/08/2019 Planning the Solution Pseudocode is a semi-programming language used to describe the steps in an algorithm. Flowchart is a graphical representation of an algorithm. Nouf Aljaffan (C) 2018 (C) 2017 Nouf Aljaffan

Planning the Solution 1) Flowchart 2) Pseudocode Start/End Begin/End (not necessary) Input/Output Read/Print : read x,y Process [An equation] : x=y+6 Comput: compute x as y+6 Decision If/ if-else / While Predefined process [function_name()]: average(x,y) Line Not Applicable Connector Nouf Aljaffan (C) 2018

Example 1 Sequence Nouf Aljaffan (C) 2018

Example 2 Compare and branch Flowchart Pseudocode Nouf Aljaffan (C) 2018

Example 3 Iterate or Loop Flowchart Pseudocode start Nouf Aljaffan (C) 2018 End

Example 4 Calling predefined processor Nouf Aljaffan (C) 2018

Exercise 1 Write an algorithm to find the perimeter of triangle Nouf Aljaffan (C) 2018

Write an algorithm to find greatest of given three numbers 1 Write an algorithm to check whether given integer value is PRIME or NOT. 2 Exercise 2 Nouf Aljaffan (C) 2018

Exercise 3 ABC company plans to give a 6% year-end bonus to each of its employees earning Rs 6,000 or more per month , and a fixed Rs 250 bonus to the remaining employees. Write an algorithm to calculate the bonus for an employee Nouf Aljaffan (C) 2018

Conclusion The flowchart and the pseudocode were explained There are many styles of pseudocode. Flowchart could be time-consuming but a good tool in education. Nouf Aljaffan (C) 2018

Question! Nouf Aljaffan (C) 2018

References https://computationalthinkingcourse.withgoogle.com/unit Nouf Aljaffan (C) 2018