Problem Solving INFORMATION TECHNOLOGY

Slides:



Advertisements
Similar presentations
Andrew C. Samuels, Information Technology Specialist Trainer c/o Ministry of Education Mona High School, Kingston, Jamaica 1 Problem Solving Section 2:
Advertisements

Introduction to Visual Basic and the VB IDE
Andrew C. Samuels, Information Technology Specialist Trainer c/o Ministry of Education Mona High School, Kingston, Jamaica 1 Problem Solving Section 2:
Computer Programming Mr. José A. Ortiz Morris. Computer Language  Languages that the computer understands.  They are low level languages. (BINARY 1.
PROBLEM SOLVING TECHNIQUES
PSEUDOCODE & FLOW CHART
Subject: Information Technology Grade: 10
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
Chapter 3 Planning Your Solution
Review Algorithm Analysis Problem Solving Space Complexity
1 The First Step Learning objectives write Java programs that display text on the screen. distinguish between the eight built-in scalar types of Java;
Chapter 1 Pseudocode & Flowcharts
Computer Programming 12 Lesson 2 - Organizing the Problem By Dan Lunney.
Sw development1 Software Development 1.Define the problem (Analysis) 2.Plan the solution 3.Code 4.Test and debug 5.Maintain and Document.
PROGRAMMING, ALGORITHMS AND FLOWCHARTS
Programming.
INTRODUCTION TO ALGORITHMS PROGRAMMING. Objectives Give a definition of the term algorithm Describe the various parts of the pseudocode algorithm or algorithm.
Goals of Course Introduction to the programming language C Learn how to program Learn ‘good’ programming practices.
Chapter 2 - Algorithms and Design
Input, Output, and Processing
Programming Logic and Design Fifth Edition, Comprehensive
CSE 102 Introduction to Computer Engineering What is an Algorithm?
Software Life Cycle What Requirements Gathering, Problem definition
INFORMATION TECHNOLOGY CSEC CXC 10/25/ PASCAL is a programming language named after the 17th century mathematician Blaise Pascal. Pascal provides.
C++ Programming Language Lecture 2 Problem Analysis and Solution Representation By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
Programming Logic and Design Sixth Edition Chapter 5 Looping.
Writing Program Code in BASIC Write a program to prompt for and accept values into TWO variables, numx and numy. The program should square the value stored.
Value and Reference Parameters. CSCE 1062 Outline  Summary of value parameters  Summary of reference parameters  Argument/Parameter list correspondence.
PROBLEM SOLVING & ALGORITHMS CHAPTER 5: CONTROL STRUCTURES - SELECTION.
NA2204.1jcmt CSE 1320 Intermediate Programming C Program Basics Structure of a program and a function type name (parameters) { /* declarations */ statement;
ALGORITHMS AND FLOWCHARTS CSCI 105 – Computer Fluency.
Programming, an introduction to Pascal
Cosc175 - Define Problem/Design Solution/Pseudocode/Trace 1 DEFINE THE PROBLEM.
Circles: Arc Length and Sector Area
© 2011 Pearson Addison-Wesley. All rights reserved. Addison Wesley is an imprint of Stewart Venit ~ Elizabeth Drake An Introduction to Programming.
Chapter 7 Problem Solving with Loops
Algorithm Discovery and Design Objectives: Interpret pseudocode Write pseudocode, using the three types of operations: * sequential (steps in order written)
INTRODUCTION TO PROGRAMMING. Program Development Life Cycle The program development life cycle is a model that describes the stages involved in a program.
The Hashemite University Computer Engineering Department
LESSON 1 Introduction to Programming Language. Computer  Comprised of various devices that are referred to as HARDWARE.  The computer programs that.
Exercise 1 #include int main() { printf(“Hello C Programming!\n”); return 0; } 1.Run your Visual Studio 2008 or Create a new “project” and add.
Topics: Selection Statements. Processing Involving Selecting Instructions An instruction that allows deviation and selection to take place uses the ‘IF’
WHAT IS THIS? Clue…it’s a drink SIMPLE SEQUENCE CONTROL STRUCTURE Introduction A computer is an extremely powerful, fast machine. In less than a second,
Flowchart. a diagram of the sequence of movements or actions of people or things involved in a complex system or activity. a graphical representation.
PROBLEM SOLVING. REDBLUE GREENPINK ORANGEYELLOW Exit.
Lecture Notes 1/20/05 Pseudocode.  Pseudocode standard which we will follow in this class: - Statements are written in simple English; - Each instruction.
PROBLEM SOLVING. What is a Problem? A problem is a situation that needs to be resolved.
Computer Programming 12 Lesson 6 – Loop structure By: Dan Lunney.
Lecture 3 Computer Programming -1-. The main steps of program development to solve the problem: 1- problem definition : The problem must be defined into.
CSE 110: Programming Language I Matin Saad Abdullah UB 404.
CIS 115 AID Peer Educator/cis115aid.com FOR MORE CLASSES VISIT
CIS 115 All Exercises Devry University (Devry) FOR MORE CLASSES VISIT CIS 115 All Exercises Devry University.
ALGORITHMS AND FLOWCHARTS
GC101 Introduction to computers and programs
Lesson 2 Flowcharting.
Introduction to Algorithms
CS111 Computer Programming
CHAPTER 5A Loop Structure
ALGORITHMS AND FLOWCHARTS
PROBLEM SOLVING CSC 111.
Algorithms & Pseudocode
1) C program development 2) Selection structure
Lecture Notes 8/24/04 (part 2)
ALGORITHMS AND FLOWCHARTS
Introduction to Algorithms and Programming
Problem Solving Skill Area 305.1
Using the Target Variable Inside the Loop
Introduction to Programming
GCSE Computing Mini Assignment.
WRITING AN ALGORITHM, PSEUDOCODE, AND FLOWCHART LESSON 2.
Presentation transcript:

Problem Solving INFORMATION TECHNOLOGY 3/31/2017 INFORMATION TECHNOLOGY Problem Solving Section 2: Obj. 6 CXC IT Syllabus Andrew C. Samuels, Information Technology Specialist Trainer c/o Ministry of Education Mona High School, Kingston, Jamaica Andrew Samuels

CXC IT Syllabus Section 2 Obj 2: identify ways of representing algorithms; Psuedocode - is an algorithm that models or resembles the real programming language of a computer. It cannot be executed by the computer. Flowcharts – consists of a set of symbols that are used to represent programming logics.

Use of Input Statements Input statements are used to place data inside the computer for the programmer to use. In Psuedocode Algorithm, Read, is used to enter data. For e.g. Write a psuedocode algorithm to input a number Begin Read N END. Write a statement to accept the day, month and year a person is born. Read Day Read Month Read Year Begin Read Day, Month, Year END.

Use of Output Statements Output statements are used to get information out of the computer by the program. In Psuedocode Algorithm, Print, is used to display information. For e.g. Write a psuedocode algorithm to print your name. Begin Read Name Print “Your name is “ Name END. Write a statement to display the time. Read Time Print “The time is “ Time Information or instructions entered between quotation marks are printed as is.

Use of Output Statements Output statements may also be used when prompting for information. Similarly, Output statements maybe useful to caption. For e.g. Write a psuedocode algorithm prompt the user to enter their first and last name and provide output. Begin Print “Enter your first name.” Read FName Print “Enter your last name.” Read Lname Print “Your full name is “ Fname LName END. Write a psuedocode to request the user to enter their age and print it. Print “Enter your age.” Read Age Print “Your age is “ Age END

Use of Assignment Statements Mathematical Operators used + (Add), - (Subtract), / (Divide), * Multiplication. Assignment statements are used to assist in making calculations inside a program. The Assignment statement is used to give a value to a variable. Assignment statements can be also used to change the value of a variable. The Assignment Operator is . Write a psuedocode algorithm to ask the user to input the name of a student, the marks he/she received in a test and the maximum number of marks in the test. Calculate the percentage mark the student receive. Print the information with suitable labels. Increasing the value of Salary by 2%. Salary  Salary * (.02 * Salary) Print “Enter your name.” Read Name Print “Enter the marks received.” Read Marks Print “Enter maximum marks in test.” Read MaxMarks Percentage  Marks/MaxMarks Print “The percentage score is “ Percentage END.

Use of Assignment Statements Write a structured algorithm to prompt the user to input the ages of four students. The algorithm should allow the user to input these ages, find the average and print it with suitable label. Write a psuedocode algorithm to ask the user to input the radius of a circle. Calculate the diameter and print with suitable label. Print “Enter the ages of four students.” Read Age1, Age2, Age3, Age4 Sum  Age 1+Age2+Age3+Age4 AvgAge  Sum/4 Print “The average age is “ AvgAge END. Print “Enter the radius for the circle.” Read Rad Diameter  Rad * 2 Print “The diameter of the circle is “ Diameter END.

Assignment Statement (cont’d) Write a structured algorithm that prompts the user to input the number of days in a month. Calculate and print the number of hours in the month appropriately labelled. Note how Constants are used for MaxHours as there are a fixed number of days in the month. MaxHours = 24 Print “Enter the number of days.” Read Days Hours  Days * MaxHours Print “The number of hours in the month is “ Hours END. Write a structured algorithm to prompt the user to enter the side length of a square. Calculate and print the square with an appropriate label. Print “Enter the side of a square.” Read Side Area  Side * Side Print “The area is “ Area END.