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.

Slides:



Advertisements
Similar presentations
ALGORITHMS AND FLOWCHARTS
Advertisements

CS 240 Computer Programming 1
PROBLEM SOLVING TECHNIQUES
How Are Algorithms Developed?
PSEUDOCODE & FLOW CHART
Reference :Understanding Computers
CS 240 Computer Programming 1
Fundamentals of Algorithms MCS - 2 Lecture # 4
INTRODUCTION TO PROGRAMMING
Flowcharts.
Chapter 2- Visual Basic Schneider
Programming Logic and Design, Introductory, Fourth Edition1 Understanding Computer Components and Operations (continued) A program must be free of syntax.
Chapter 3 Planning Your Solution
The Program Design Phases
Review Algorithm Analysis Problem Solving Space Complexity
Fundamentals of C programming
Flow Charting. Goals Create Algorithms using Flow Charting procedures. Distinguish between Flow Charting and Pseudocode. Top-Down Design Bottom-up Design.
Design the program Create a detailed description of program –Use charts or ordinary language (pseudocode) Identify algorithms needed –Algorithm: a step-by-step.
1 Introduction to Flowcharting. 2 Writing a program Defining the problem –Write down what the program will do Planning –Write down the steps, draw a flowchart.
Describe the Program Development Cycle. Program Development Cycle The program development cycle is a series of steps programmers use to build computer.
INTRODUCTION TO COMPUTING CHAPTER NO. 04. Programming Languages Program Algorithms and Pseudo Code Properties and Advantages of Algorithms Flowchart (Symbols.
Flowcharts. Problem Solving Computer programs are written to solve problems or perform tasks Programmers translate the solutions or tasks into a language.
ALGORITHMS AND FLOWCHARTS CSCI 105 – Computer Fluency.
Basic problem solving CSC 111.
PROGRAM DEVELOPMENT CYCLE. Problem Statement: Problem Statement help diagnose the situation so that your focus is on the problem, helpful tools at this.
1 Program Planning and Design Important stages before actual program is written.
Fundamentals of Algorithms MCS - 2 Lecture # 5. Representation of Algorithms (continued) Flowcharts.
CSC 111. Solving Problems with Computers Java Programming: From Problem Analysis to Program Design, Third Edition3 Solving Problems Stages 1.Problem.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
FLOWCHARTING AND ALGORITHMS
How Computers Solve Problems Computers also use Algorithms to solve problems, and change data into information Computers can only perform one simple step.
 Problem Analysis  Coding  Debugging  Testing.
Chapter One Problem Solving
Learning outcomes 5 Developing Code – Using Flowcharts
Flow Charts Basic Flow Chart Symbols Few sample flowcharts Rules
GC101 Introduction to computers and programs
Introduction to Flowcharting
Programming Languages
Unit 3: ALGORITHMS AND FLOWCHARTS
Chapter One Problem Solving
Flowcharting Guidelines
Presentation of Flowchart
Chapter 2- Visual Basic Schneider
Lecture 2 Introduction to Programming
Introduction To Flowcharting
Chapter Topics 2.1 Designing a Program 2.2 Output, Input, and Variables 2.3 Variable Assignment and Calculations 2.4 Variable Declarations and Data Types.
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.
Introduction to Computer Programming
Programming Logic n Techniques
Unit# 9: Computer Program Development
Programming Fundamentals (750113) Ch1. Problem Solving
Computers & Programming Languages
SME1013 PROGRAMMING FOR ENGINEERS
Chapter 2- Visual Basic Schneider
Introduction to Algorithms and Programming
CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
Chapter 2- Visual Basic Schneider
ME 142 Engineering Computation I
SME1013 PROGRAMMING FOR ENGINEERS
Understanding Problems and how to Solve them by using Computers
How Are Algorithms Developed?
Software Development Process
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
Developing a Program.
Basic Concepts of Algorithm
WJEC GCSE Computer Science
Programming Logic and Design Eighth Edition
Presentation transcript:

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 involves identifying the variable names and types that would be used for solving the problem.

Example of algorithm Step 1=Accept the as first integer from the user.(num1) Step 2=Accept the second integer as input from the user.(num2) Step 3=Calculate the sum of the two integer. Step 4=Display sum as the result.

Characteristic The instruction must be in an ordered form. The instruction must be simple and concise. They must not be ambiguous. There must be an instruction for program termination. The repetitive programming constructs must possess an exit condition.Otherwise,the program might run infinitely. The algorithm must completely and definitely solve the given problem statement.

Advantages It provides the core solution to a given problem. This solution can be implemented on a computer system using any programming languages of user’s choice. It ease identification and removal of logical errors in a program. It facilitates algorithm an analysis to find out the most efficient solution to a given problem. It ensures easy comprehension of a problem solution as compared to an equivalent computer program.

Disadvantages In large algorithm, the flow of program control becomes difficult to track. Algorithms lack, visual representation of programming construct like flowchart; thus ,understanding the logics becomes relatively difficult.

Flowcharts A flowchart is the graphical representation of the flow of control and logic in the solution of a problem. The flowchart is a pictorial representation of an algorithm.

Symbols used in flowchart 1. or Start and end: It represent starting and ending of a process in flowchart. 2. Input and output: It represent Input and output given by the by the user to the process.

3. Action or Process: It represents logic,action and calculation taking place in a process. 4. Decision and condition: It represents the condition or the decision making step in a flowchart

5. Arrow: It represents the flow of process and the sequence of steps In a flowchart. 6. Connecter: It represents the continuation of the flow of steps When a flowchart continues to the Next page.

Average=(marks1+marks2+ Example of flowchart Flowchart to find the ay average of marks obtained by a student. Starts Read marks1,marks2,marks3 Average=(marks1+marks2+ +marks3)/3 Display average Stop

characteristics It must begin with a “Start” and end with a “stop” symbol. The standard process flow should be either from top to bottom or form left to right. The instruction specified in the flowchart must be crisp and concise. The arrow must be aligned properly so as to clearly depict the flow of program control. The use of connecter should be generally avoided as they make the program look more complex. A process or action flowchart symbol must have only one input arrow and output arrow.

Advantages It helps to understand the flow of program. It helps in avoiding semantic errors. A flowchart acts as documentation for the process . The use of flowcharts works well for small program design.

Disadvantages For a large program, the flow chart might become very complex and confusing. Modification of a flowchart is difficult and requires almost an entire rework. Excessive use of connectors in a flowchart may at times confuse the programmers.

Thank you