ICS 3U Thursday, September 9.

Slides:



Advertisements
Similar presentations
CS107 Introduction to Computer Science Lecture 2.
Advertisements

Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
 Control structures  Algorithm & flowchart  If statements  While statements.
Chapter 2- Visual Basic Schneider
Chapter 2: Algorithm Discovery and Design
Pseudocode.
Review Algorithm Analysis Problem Solving Space Complexity
Computers & Logic An Overview. Hardware Hardware is the equipment, or the devices, associated with a computer. For a computer to be useful, however, it.
ALGORITHMS AND FLOWCHARTS
PRINCIPLES OF PROGRAMMING Revision. A Computer  A useful tool for solving a great variety of problems.  To make a computer do anything (i.e. solve.
DCT 1123 Problem Solving & Algorithms
CSC141 Introduction to Computer Programming
Flow Charting. Goals Create Algorithms using Flow Charting procedures. Distinguish between Flow Charting and Pseudocode. Top-Down Design Bottom-up Design.
INTRODUCTION TO ALGORITHMS PROGRAMMING. Objectives Give a definition of the term algorithm Describe the various parts of the pseudocode algorithm or algorithm.
The Software Development Life Cycle. Software Development SDLC The Software Development Life-Cycle Sometimes called the program development lifecycle.
Describe the Program Development Cycle. Program Development Cycle The program development cycle is a series of steps programmers use to build computer.
CSE 102 Introduction to Computer Engineering What is an Algorithm?
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.
Coding Design Tools Rachel Gauci. What are Coding Design Tools? IPO charts (Input Process Output) Input- Make a list of what data is required (this generally.
Pseudocode. Simple Program Design, Fourth Edition Chapter 2 2 Objectives In this chapter you will be able to: Introduce common words, keywords, and meaningful.
Pseudocode Simple Program Design Third Edition A Step-by-Step Approach 2.
Algorithms, Part 2 of 3 Topics Problem Solving Examples Pseudocode
Software Development. Software Development Loop Design  Programmers need a solid foundation before they start coding anything  Understand the task.
CSC 1010 Programming for All Lecture 3 Useful Python Elements for Designing Programs Some material based on material from Marty Stepp, Instructor, University.
Structured Programming (4 Credits) HNDIT Week 2 – Learning Outcomes Design an algorithmic solution for simple problem such as computation of a factorial,
1 Overview of Programming Principles of Computers.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
Algorithms and Pseudocode
CS 101 – Oct. 7 Solving simple problems: create algorithm Structure of solution –Sequence of steps (1,2,3….) –Sometimes we need to make a choice –Sometimes.
Getting Started With Python Brendan Routledge
Computer Programming Week 1: The Basics of CP 1 st semester 2012 School of Information Technology Website:
PYTHON PROGRAMMING Year 9. Objective and Outcome Teaching Objective Today we will look at conditional statements in order to understand how programs can.
Software Development.
CS1010 Programming Methodology
INTRODUCTION TO PROBLEM SOLVING
Introduction to Algorithms
1-1 Logic and Syntax A computer program is a solution to a problem.
2008/09/22: Lecture 6 CMSC 104, Section 0101 John Y. Park
Chapter 2: Input, Processing, and Output
GC211Data Structure Lecture2 Sara Alhajjam.
Chapter 2- Visual Basic Schneider
Algorithms, Part 2 of 3 Topics Problem Solving Examples Pseudocode
Algorithms, Part 2 of 3 Topics Problem Solving Examples Pseudocode
2008/09/24: Lecture 6b CMSC 104, Section 0101 John Y. Park
Logical Operators and While Loops
ALGORITHMS AND FLOWCHARTS
Introduction to pseudocode
Algorithms & Pseudocode
Programming Right from the Start with Visual Basic .NET 1/e
For -G7 programing language Teacher / Shamsa Hassan Alhassouni.
Programming Funamental slides
1) C program development 2) Selection structure
Algorithms, Part 2 of 3 Topics Problem Solving Examples Pseudocode
ALGORITHMS AND FLOWCHARTS
Chapter 2- Visual Basic Schneider
Algorithms, Part 2 of 3 Topics Problem Solving Examples Pseudocode
Introduction to Algorithms and Programming
Fundamental Programming
King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1 Done By: Asmal Alosaimi Edited By: Fatimah Alakeel.
Visual Basic – Decision Statements
Introduction to Algorithms - 1
King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1 Done By: Asmal Alosaimi Edited By: Fatimah Alakeel.
Logical Operators and While Loops
Programming Concepts and Database
Algorithms, Part 2 of 3 Topics Problem Solving Examples Pseudocode
Algorithms, Part 2 of 3 Topics Problem Solving Examples Pseudocode
Hardware is… Software is…
WRITING AN ALGORITHM, PSEUDOCODE, AND FLOWCHART LESSON 2.
Programming Logic and Design Eighth Edition
Introduction to Programming
Presentation transcript:

ICS 3U Thursday, September 9

Sept. 9 - Agenda Hand in Instruction Writing Programmer’s Toolkit Orginal image Rough instructions with feedback (hopefully) from other person Good copy (on top) – stapled with name and colour clearly indicated Programmer’s Toolkit Pseudocode Pseudocode Practice

Programmer’s Toolkit Programming languages are used to design logic and write algorithms. All languages have the same core set of capabilities, although the specific syntax may vary. Example: to output words to the monitor print “Hello”  Visual Basic cout << “Hello”;  C++ writeln (‘hello’);  Pascal The core set of capabilities common to All programming languages is called the Programmer’s Tooklit.

Programmer’s Toolkit Input Statements – capture user input to the program (usually from the keyboard or mouse) Output Statements – output information to an output device (usually the monitor) Storage – storing data / information in variables Math Calculations Selection Statements (if statement, case statement) – making a decision Repetition Statements (loops) – repeating a block of statements **Modularity – the ability to create re-usable blocks of code

Pseudocode Pseudo = Fake Pseudocode = Fake Code Pseudocode is used to plan the logic of a program. Taking a problem, and using the tools from the Programmer’s Toolkit, you can write a series of instructions for a problem. Pseudocode is a mixture of English and code so you do not have to worry about syntax, just the clarity of the explanation / logic.

Pseudocode Example Smallest of Two Numbers Ask the user to input a number (output) Store the number in num1 (input, storage) Store the number in num2 (input, storage) If num1 < num2 then (selection) Output “num1 is the smallest” Else, if num1 > num2 then (selection) Output “num2 is the smallest” (output) Otherwise Output “the numbers are equal” (output)

Pseudocode Guidelines Write a step by step method to solve the problem Use tools from the Programmer’s Toolkit Identify mathematical calculations Hi-lite variables (bold, underline) Include algorithmic explanations (translate into comments) Indent (tab in) statements that are part of a loop of conditional statement

Pseudocode Practice Write pseudocode for the following problems: Average 3 numbers inputted from the user. Sorting a list of 3 numbers in ascending order. (assume each number is different). Enrichments: Calculate median, mode. Sort 10 numbers, sort an unknown number of numbrs, sort with some numbers equal.