P ROBLEM SOLVING Design program using pseudocode and flowchart.

Slides:



Advertisements
Similar presentations
CSCI 130 Pseudocode. Structure Theorem Any program can be created by using the following 3 control structures: –sequence –selection (IF-THEN-ELSE) –iteration.
Advertisements

EE2372 Software Design with Flowcharts
JAVA Coursework (the same for 2A and 2B). Fundamental Information The coursework is 30 marks in your O’Level = 15% of the exam Must be word processed.
Al-Karma Language School Computer Department Prep. 3.
Subject: Information Technology Grade: 10
ALGORITHMS AND FLOWCHARTS
Chapter 1 Pseudocode & Flowcharts
UNIVERSITI TENAGA NASIONAL “Generates Professionals” SOFTWARE DEVELOPMENT METHOD EXERCISE.
LECTURE 1 CMSC 201. Overview Goal: Problem solving and algorithm development. Learn to program in Python. Algorithm - a set of unambiguous and ordered.
INTRODUCTION TO PROGRAMMING
LAB-04 IF Structure I Putu Danu Raharja Information & Computer Science Department CCSE - King Fahd University of Petroleum & Minerals.
Functions.
11.3 Function Prototypes A Function Prototype contains the function’s return type, name and parameter list Writing the function prototype is “declaring”
Defining Control Structures
The Program Development Cycle and Program Design Tools
A High-Level Model For Software Development
Review Algorithm Analysis Problem Solving Space Complexity
Chapter 1 Pseudocode & Flowcharts
Computer Programming 12 Lesson 2 - Organizing the Problem By Dan Lunney.
CS 0004 –Lecture 8 Jan 24, 2011 Roxana Gheorghiu.
U NDERSTANDING P ROBLEMS AND HOW TO S OLVE THEM BY USING C OMPUTERS.
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Looping Exercises Deciding Which Loop to Use At this.
Unit B065 – Coding a solution PREP WORK 1)Make sure you keep a work log / diary. Use the table on page 16 of the hand book as a template 2)Keep a bibliography.
Looping While-continue.
Chapter 2: Beginning the Problem-Solving Process
Pseudocode Demo for Payroll.c
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.
Basic Of Computer Science
Practice and Evaluation. Practice Develop a java class called: SumCalculator.java which computes a sum of all integer from 1 to 100 and displays the result.
Example – Solve the system of equations below We will do this graphically on our calculator. We first need to isolate y in each equation.
EXERCISE IN CLASS CHAPTER 2. PART 1 SEQUENCE SCENARIO 1 Write an algorithm for a C program, that prompts user to enter total number of umbrellas he/she.
30/10/ Iteration Loops Do While (condition is true) … Loop.
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Flowcharts. Problem Solving Computer programs are written to solve problems or perform tasks Programmers translate the solutions or tasks into a language.
Procedural Programming. Programming Process 1.Understand the problem 2.Outline a general solution 3.Decompose the general solution into manageable component.
Let’s Learn About Money!
Chapter 1 Pseudocode & Flowcharts
Chapter 7 Problem Solving with Loops
Algorithms, Part 3 of 3 Topics In-Class Project: The Box
An Introduction to Programming with C++ Sixth Edition
Concepts of Algorithms CSC-244 Unit Zero Pseudo code, Flowchart and Algorithm Master Prince Computer College Qassim University K.S.A.
Topic: Control Statements. Recap of Sequence Control Structure Write a program that accepts the basic salary and allowance amount for an employee and.
Topics: Selection Statements. Processing Involving Selecting Instructions An instruction that allows deviation and selection to take place uses the ‘IF’
SEQUENCES:STRINGS,LISTS AND TUPLES. SEQUENCES Are items that are ordered sequentially and accessible via index offsets into its set of elements. Examples:
Flowchart. a diagram of the sequence of movements or actions of people or things involved in a complex system or activity. a graphical representation.
Assignments. Assignment 1 Write a program to calculate the current equation Where p is the period of pendulum in seconds, g=980 cm/sec 2 (acceleration),
ALGORITHMS AND FLOWCHARTS. A typical programming task can be divided into two phases: Problem solving phase  produce an ordered sequence of steps that.
Introduction to Programming Python Lab 7: if Statement 19 February PythonLab7 lecture slides.ppt Ping Brennan
SEQUENCES:STRINGS,LISTS AND TUPLES. SEQUENCES Are items that are ordered sequentially and accessible via index offsets into its set of elements. Examples:
Problem Solving.  Similar to Solving Math Word Problem  Read the Problem  Decide how to go about Solving the Problem  Solve the Problem  Test the.
An Introduction to Programming with C++1 Beginning the Problem- Solving Process Tutorial 2.
CSE 110: Programming Language I Matin Saad Abdullah UB 404.
CIS 115 AID Peer Educator/cis115aid.com FOR MORE CLASSES VISIT
Problem solving Chapter 3
Algorithms 09/04/13. Algorithm Step-by-step process for solving a problem. Often described in pseudocode language. Unambiguous, Executable and Terminating.
DEVRY CIS 170 C I L AB 2 OF 7 D ECISIONS Check this A+ tutorial guideline at decisions For.
Entry Ticket: Algorithms and Program Construction
Chapter 5: Control Structure
Lecture 3 MIT 12043, Fundamentals of Programming By: S. Sabraz Nawaz
Chapter 1 Pseudocode & Flowcharts
ALGORITHMS AND FLOWCHARTS
Designing an Algorithm
Pseudocode & Flowcharts
CS110D Programming Language I
Chapter 1 Pseudocode & Flowcharts
CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
No Yes START Do you live in Scotland? Take umbrella See last Flowchart
Design program using pseudocode and flowchart
WJEC GCSE Computer Science
Chapter 1 Pseudocode & Flowcharts
Presentation transcript:

P ROBLEM SOLVING Design program using pseudocode and flowchart

E XERCISE 5- SEQUENCE AND SELECTION STRUCTURE Suppose a company decides to raise the salaries of its employees according to the following table: Employee-statusYears –of- service Percent-raise Full-timeLess than 5 years4.0 Full-time5 years and more5.0 Given the problem above, design the solution using pseudocode and flowchart.

E XERCISE 6 The National Earthquake Information center has asked you to write a program implementing the following decision table to characterize an earthquake based on its Richter scale number. Richter scale number (n) Characterization n < 5.0Little or no damage 5.0 <=n < 5.5Some damage 5.5 <= n < 6.5Serious damage 6.5 <= n < 7.5Disaster HigherCatastrophe Given the problem above, design the solution using pseudocode and flowchart.

E XERCISE 7 Write a program to convert an input number of nickels and dime into a total number of cents. For example, if the user inputs 3 and 7 for the number of nickels and dimes, respectively, the screen display at the end of the run would be : Enter number of nickels and dimes nickels and 7 dimes = 85 cents. Hints: value for nickel = 5, dimes =10 Given the problem above, design the solution using pseudocode and flowchart.

E XERCISE 8 At the Orange College, tuition charges are RM 50 per credit, with a maximum of RM750 no matter how many credits are taken. Thus, a student taking 12 credits would pay RM600, whereas a student taking 21 credits would pay the maximum charge of RM750. Write a psedocode and draw a flowchart in which the number of credits is input and the tuition charge is output.