Flow chart and Algorithm. Announcement Exam One – Wednesday October 1st – 100 points – Mixture of short answer, problem solving, matching, and maybe a.

Slides:



Advertisements
Similar presentations
Steps of a Design Brief V Design Brief  Problem, identification, and definition Establish a clear idea of what is to be accomplished. Identify.
Advertisements

PROBLEM SOLVING TECHNIQUES
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Lecture 1: Overview of Computers & Programming
COMPUTER PROGRAMMING I Understand Problem Solving Tools to Design Programming Solutions.
1.4 Programming Tools Flowcharts Pseudocode Hierarchy Chart
Chapter 1 - An Introduction to Computers and Problem Solving
Chapter 2 - Problem Solving
Reference :Understanding Computers
Chapter 2 - Problem Solving
Basics of Computer Programming Web Design Section 8-1.
 Control structures  Algorithm & flowchart  If statements  While statements.
ITEC113 Algorithms and Programming Techniques
Defining Control Structures
Computing Components 01/26/11. Announcements & Reminders Programs 1 due Friday, 9/2/11 What is my late policy? Proxy Codes for Labs  You should be able.
Pseudocode and Algorithms
The Program Design Phases
Review Algorithm Analysis Problem Solving Space Complexity
DCT 1123 PROBLEM SOLVING & ALGORITHMS INTRODUCTION TO PROGRAMMING.
The University of Texas – Pan American
An ordered sequence of unambiguous and well-defined instructions that performs some task and halts in finite time Let's examine the four parts of this.
Lesson 1b: Computer Systems and Program Development CPS118.
The Logical Structure of Algorithms. Algorithms Steps necessary to complete a task or solve a problem. Example: Recipe for baking a cake –Will contain.
C++ If….Else Statements and Flowcharts October 10, 2007.
Number Systems Spring Semester 2013Programming and Data Structure1.
PROGRAMMING LANGUAGES Prof. Lani Cantonjos. PROGRAM - set of step-by-step instructions that tells or directs the computer what to do. PROGRAMMING LANGUAGE.
Chapter 2 - VB.NET by Schneider1 Chapter 2 - Problem Solving Program Development Cycle Programming Tools.
Software Life Cycle What Requirements Gathering, Problem definition
Getting Started with MATLAB 1. Fundamentals of MATLAB 2. Different Windows of MATLAB 1.
Pseudocode Simple Program Design Third Edition A Step-by-Step Approach 2.
Flowcharts. Problem Solving Computer programs are written to solve problems or perform tasks Programmers translate the solutions or tasks into a language.
Programming at a high level. Developing a Computer Program Programmer  Writes program in source code (VB or other language) Compiler  Converts source.
Algorithms & Flowchart
Chapter 2: General Problem Solving Concepts
Procedural Programming. Programming Process 1.Understand the problem 2.Outline a general solution 3.Decompose the general solution into manageable component.
PROGRAM DEVELOPMENT CYCLE. Problem Statement: Problem Statement help diagnose the situation so that your focus is on the problem, helpful tools at this.
`. Lecture Overview Structure Programming Basic Control of Structure Programming Selection Logical Operations Iteration Flowchart.
Computer Programming I Summer 2011
1 Programming Tools Flowcharts Pseudocode Hierarchy Chart Direction of Numbered NYC Streets Algorithm Class Average Algorithm.
Fundamentals of Algorithms MCS - 2 Lecture # 5. Representation of Algorithms (continued) Flowcharts.
Introduction to Computing Dr. Nadeem A Khan. Lecture 2.
Structured Programming (4 Credits)
Algorithm An algorithm, named after the ninth century scholar Abu Jafar Muhammad Ibn Musu Al- Khowarizmi, is defined as follows: An algorithm is a set.
Chapter 2 - VB 2005 by Schneider- modified by S. Jane '081 Chapter 2 - Problem Solving 2.1 Program Development Cycle 2.2 Programming Tools.
Problem-solving with Computers. 2Outline  Computer System  5 Steps for producing a computer program  Structured program and programming  3 types of.
Expressing Algorithms as Flowcharts and Pseudocode
Programming. In your own words, explain what an algorithm is, and give an example of how people use algorithms every day.
Steps of a Design Brief V Purpose of a Design Brief  A design brief is the process used to solve problems or complete presentations.  It is very.
Introduction to Programming Lecture 1 – Overview
Understand Problem Solving Tools to Design Programming Solutions
Programming Languages
Basics of Computer Programming
Chapter 4 C Program Control Part I
Be A programmer in Steps
Introduction to Computing
CS1001 Programming Fundamentals 3(3-0) Lecture 2
Understand Problem Solving Tools to Design Programming Solutions
Lecture 2 Introduction to Programming
Numbering System TODAY AND TOMORROW 11th Edition
Basics of Computer Programming
Basics of Computer Programming
Basics of Computer Programming
Structured Program
` Structured Programming & Flowchart
Flowcharts and Pseudo Code
ICT Gaming Lesson 2.
Introduction to Programming
Basic Concepts of Algorithm
Presentation transcript:

Flow chart and Algorithm

Announcement Exam One – Wednesday October 1st – 100 points – Mixture of short answer, problem solving, matching, and maybe a multiple choice question Monday class will be held as a review session.

Exam Next Wednesday History of Computers Hardware – inside and outside Software – Microsoft Word, Excel Spread sheet and data Operating Systems and Computer Security Pirates of Silicon Valley Writing Lab Reports Binary Mathematics Flowcharts and Algorithms

Today’s Topics Algorithms Flowcharts Pseudo code

Problem Solving For the rest of the semester, we will practice problem-solving. If you learn nothing else from this class, I would like you to learn to take a good approach to problem solving

Algorithms To solve a problem, you got to figure out how to solve it by yourself. To make a computer solve a problem, you need to you have to tell the computer, step by step, exactly what you want it to do. The computer then "executes" the program, following each step mechanically, to accomplish the end goal. Algorithm: Sequence of step-by-step instructions that will produce a solution to a problem

Four algorithms The taxi algorithm: – Go to the taxi stand. – Get in a taxi. – Give the driver my address. The call-me algorithm: – When your plane arrives, call my cell phone.planecell phone – Meet me outside baggage claim.baggage claim The rent-a-car algorithm: – Take the shuttle to the rental car place. – Rent a car. – Follow the directions to get to my house. The bus algorithm: – Outside baggage claim, catch bus number 70. – Transfer to bus 14 on Main Street. – Get off on Grand River Ave. – Walk two blocks north to my house.

Problem to Solve What steps would you propose to solve the following problem? – You are dirty and want to clean up – Solution: Take a shower What are the steps?

Example of Algorithm Take clothes off Turn on water Step into shower Wash face Wash body Shampoo hair Turn water off Dry off Get dressed Problem: You are dirty Solution: Take a shower How: Take a Shower Algorithm Take a Shower Algorithm

Sequence of Steps Fairly regular order of events – must take clothes off first – cannot dry off before washing Cannot skip steps to complete job Result oriented Termination of algorithm after result

Algorithm Example Define the algorithm for mailing a letter, from obtaining the envelope to placing it in the mailbox

Mailing a Letter Obtain Envelope If letter is too big, fold letter Place letter in envelope Address Envelope Seal envelope Obtain stamp Affix stamp Place in mailbox

Flowcharts Flowcharts are graphical and verbal illustrations of algorithms Flowcharts are useful in describing any step- by-step procedure Flowcharts make it easier to create programming code

Flowchart Elements read x print y x = y * x begin if x > 0 start, end input output computation comparison or decision Specific shapes have specific roles in a flowchart... T F Do Assignment #5 Pre-defined process, usually complex

Flowcharts obtain envelope Is letter bigger than envelope? yes fold letter insert into envelope no address envelope affix stamp place in mailbox obtain stamp end start seal envelope raise flag

Flowchart Checklist All major elements of the algorithm are indicated. The elements are clearly labeled. Sequence of elements is clear and there are no gaps or dead ends. Sequence of elements is logical from user's point of view. Flowchart symbols are used correctly.

Decimal number to binary number:

Decimal number to binary number Start Get a number Divide the Number By 2 Is the quotient Equal to 1? Print The Remain to the left of previous remains No Print 1 To the left of Previous remains End Yes

Pseudo code Flow chart in a text form. More like a computer program, but with human language. Can be easily translated into computer languages.

Elements of pseudo code IF condition is true THEN Process step (1) ELSE Process step (2) GOTO – Unconditional jump If condition Is true Process Step (1) Process Step (2)

Example: Binary2Decimal 1. Get a number 2. IF the number is equal to 1 or 0 Print the number; END 3. Divide the number by 2 4. IF quotient is 1 THEN Print 1 to the left of the previous remains 5. ELSE Print the remain to the left of previous remains. GOTO 3 6. END

Binary-ASCII conversion Each letter is represented by an 8-bit binary number, called ASCII (American Standard Code for Information Interchange. ) Binary to Base Ten Base Ten to ASCII Details?

Steps in Binary-ASCII Input number Break number up into eight bits Compute base two values for each bit Sum base two values to get base ten value Using base ten number, look in ASCII chart Output ASCII character Is there another number? Repeat procedure

Pre-lab Assignment Using the steps of the Binary-ASCII conversion, create a flowchart, using the proper shapes, arrows, etc. In Friday’s Lab we will use Powerpoint to create flow chart.