CCPROG1

Cards (29)

  • INPUT-PROCESS-OUTPUT
    The structure of an information processing program or another process
  • ALGORITHM
    An algorithm is a set of a step-by-step instructions to solve a given problem
  • In an algorithm, many simple instructions are combined to help form a more complicated operation, which is performed with ease by the computer
  • Algorithm follows the IPO model
  • Algorithm
    uses english language/sentence, free-form
  • ALGORITHM CHARACTERISTICS
    1. input
    2. output
    3. unambiguity
    4. finiteness
    5. effectiveness
  • INPUT
    Zero or more inputs
  • OUTPUT
    One or more inputs
  • UNAMBIGUITY
    Clear and simple
  • FINITENESS
    Limited instructions
  • EFFECTIVENESS
    Impact of every step
  • VARIABLES ex.

    x=5
    y=3.14
    name= “David”
    bloodtype= ‘O’
    darkmode= True
  • RULES IN NAMING VARIABLES
    —names can contain letters, digits and underscore —names must begin with a letter or an undescore
    —names are case-sensitive
    —names cannot contain whitespaces or special characters
    —reserved wordss cannot be used as names
  • DATATYPE
    Type of data stored in a variable
  • DATATYPE
    1. Integers
    2. Decimals
    3. Character
    4. String
    5. Boolean
  • INTEGERS
    negative and positive whole numbers
  • DECIMALS
    numbers that lies between whole numbers
  • CHARACTER
    letters which can be upper of lower case
  • STRING
    words, phrases, and sentences
  • BOOLEAN
    has two states TRUE or FALSE
  • OPERATORS ( ARITHMETIC OPERATIONS )
    1. multiplication
    2. addition
    3. substraction
    4. division
    5. modulus
  • PSEUDOCODE
    — it is an informal method of developing an algorithm
    — also called false code because it tends to look like a programming language
    — uses highly english language
    — looks like line of code
  • KEYWORDS FOR PSEUDOCODE
    1. declare
    2. input
    3. process
    4. output
  • DECLARE
    creates a variable
  • INPUT
    indicates that a value is from a user
  • PROCESS
    perform operations on variable
  • OUTPUT
    display something on user's end
  • FLOWCHART
    — type of diagram that represents a workflow or process
    — use symbols and phase to designate the logic of how the problem is solved
  • FLOWCHARTING SYMBOLS
    1. terminal
    2. preparation
    3. input/output
    4. decision
    5. processing
    6. on page connector
    7. off page connector