Click to add Text Computers & Instructions. Computers are given instructions in the form of computer programs that are created through the development.

Slides:



Advertisements
Similar presentations
ALGORITHMS AND FLOWCHARTS
Advertisements

CS101: Introduction to Computer programming
ALGORITHMS AND FLOWCHARTS
PROBLEM SOLVING TECHNIQUES
© Janice Regan Problem-Solving Process 1. State the Problem (Problem Specification) 2. Analyze the problem: outline solution requirements and design.
Program Design and Development
Lecture Notes 1/21/04 Program Design & Intro to Algorithms.
Algorithms. Introduction Before writing a program: –Have a thorough understanding of the problem –Carefully plan an approach for solving it While writing.
Lecture Notes 8/30/05 Program Design & Intro to Algorithms.
Chapter 2: Algorithm Discovery and Design
PRE-PROGRAMMING PHASE
ALGORITHMS AND FLOW CHARTS 1 Adapted from the slides Prepared by Department of Preparatory year Prepared by: lec. Ghader Kurdi.
Fundamentals of C programming
ALGORITHMS AND FLOWCHARTS
PROGRAMMING, ALGORITHMS AND FLOWCHARTS
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.
A step-by-step procedure for solving a problem in a finite number of steps.
Problem Solving using the Science of Computing MSE 2400 EaLiCaRA Spring 2015 Dr. Tom Way.
Pseudocode. Simple Program Design, Fourth Edition Chapter 2 2 Objectives In this chapter you will be able to: Introduce common words, keywords, and meaningful.
ALGORITHMS AND FLOWCHARTS CSCI 105 – Computer Fluency.
Cs413_design04.ppt Design and Software Development Design : to create a functional interface that has high usability Development : an organized approach.
Basic Control Structures
1 Section 2.1 Algorithms. 2 Algorithm A finite set of precise instructions for performing a computation or for solving a problem.
CS221 Algorithm Basics. What is an algorithm? An algorithm is a list of instructions that transform input information into a desired output. Each instruction.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
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.
STEP 3- DEVELOP AN ALGORITHM At this stage we break down the problem into simple manageable steps so that they can be handled easily.
ALGORITHMS AND FLOWCHARTS. A typical programming task can be divided into two phases: Problem solving phase  produce an ordered sequence of steps that.
Problem Solving.  Similar to Solving Math Word Problem  Read the Problem  Decide how to go about Solving the Problem  Solve the Problem  Test the.
Introduction to Flowcharts
How Computers Solve Problems Computers also use Algorithms to solve problems, and change data into information Computers can only perform one simple step.
Introduction to Problem Solving Programming is a problem solving activity. When you write a program, you are actually writing an instruction for the computer.
Pseudocode (pronounced SOO-doh-kohd)  is a detailed yet readable description of what a computer program or algorithm must do, expressed in a formally-styled.
AS Level Computing 8 CHAPTER: Fundamentals of structured programming The basics of good programming Algorithms System Flow Charts Symbol Conventions Steps.
Program design Program Design Process has 2 phases:
Problem Solving & Computer Programming
CS1010 Programming Methodology
GC101 Introduction to computers and programs
INTRODUCTION TO PROBLEM SOLVING
Unit 3: ALGORITHMS AND FLOWCHARTS
GC211Data Structure Lecture2 Sara Alhajjam.
Chapter 2- Visual Basic Schneider
CS111 Computer Programming
PROGRAM CONTROL STRUCTURE
Pseudocode Upsorn Praphamontripong CS 1110 Introduction to Programming
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.
Lecture 2 Introduction to Programming
Introduction to Algorithm – part 1
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.
Algorithms, Part 2 of 3 Topics Problem Solving Examples Pseudocode
Algorithm and Ambiguity
An Introduction to Visual Basic .NET and Program Design
ALGORITHMS AND FLOWCHARTS
Unit# 9: Computer Program Development
ALGORITHMS AND FLOWCHARTS
Introduction to Algorithms
ALGORITHMS AND FLOWCHARTS
Chapter 2- Visual Basic Schneider
Algorithms, Part 2 of 3 Topics Problem Solving Examples Pseudocode
Introduction to Algorithms and Programming
CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
Chapter 2- Visual Basic Schneider
Algorithm and Ambiguity
Understanding Problems and how to Solve them by using Computers
Flowcharts and Pseudo Code
ICT Gaming Lesson 2.
Introduction to Programming
Basic Concepts of Algorithm
WJEC GCSE Computer Science
WRITING AN ALGORITHM, PSEUDOCODE, AND FLOWCHART LESSON 2.
Presentation transcript:

Click to add Text Computers & Instructions

Computers are given instructions in the form of computer programs that are created through the development of algorithms.

The role of a programmer in giving the computer instruction To create instructions that the computer needs to follow in order for it to complete a specific task.

What is an algorithm? A sequence of precise instructions for solving a problem in a finite amount of time. It can be represented in two ways:  Pseudocode – the use of English-like statements to represent an algorithm.  Flowchart – graphical representation of an algorithm.

Flowchart and Pseudocode Examples

Attributes of an algorithm Algorithms must be: precise unambiguous (not having two or more possible answers) finite (terminate after a finite number of steps) in a logical sequence

Control Structures It is possible to write any program using only three basic control structures: 1.Sequence: the straightforward execution of one processing step after another. 2.Selection: the presentation of a condition, and the choice between two or more actions, depending on whether the condition is true or false. 3.Repetition: the presentation of a set of instructions to be performed repeatedly, as long as a condition is true.

Three(3) main Control Structures

The two major phases in problem-solving on the computer Problem-Solving Phase Implementation Phase

The Problem-Solving Phase Define the problem Find a solution to the problem Evaluate the alternative solutions Represent the most efficient solution as an algorithm Test the algorithm for correctness

The Implementation Phase Translate the algorithm into specific programming language Execute the program on the computer Maintain the program

Breaking up a problem into three key components What is given (inputs) The expected results (outputs) The tasks that must be performed (processing)

Class Activity Break up the following problem into the three key components input, processing & output read two numbers, add them together and display their total

Class Activity What is given (inputs) –two numbers The expected results (outputs) –Sum of the two numbers The tasks that must be performed (processing) –Get the two numbers –Calculate the sum of the two numbers –Display the sum of the two numbers

Homework Break up the following problem into the three key components input, processing & output A box can hold one and a half dozen cans of tomatoes. Read the number of boxes and the price of a can of tomatoes; calculate and print the total cost of all the cans of tomatoes.

Homework Solution INPUT –NumberOfBoxes –Price OUTPUT –TotalCost PROCESSING 1.Read NumberOfBoxes and Price 2.Calculate the TotalCost of all the cans of tomates 3.Print TotalCost