IPO Practice Text Version


Slide 1

Extra BASIC Practice

INPUT – PROCESSING – OUTPUT

 

Slide 2

INPUT – PROCESSING – OUTPUT

A key part of writing programs is to be able to identify what steps to take and in what order to take them. For your programs, each instruction (statement) can be identified as input, processing or output.  When you are asked to write a program to perform a certain task, you will need to identify the key elements and categorize them as Input, Processing or Output.

This takes practice! Let’s get started!

 

Slide 3

What is Input, Processing, Output?

Ask Yourself…

Is this a fact or raw data I can collect? If yes, it is INPUT.

Does something need to be calculated? It is PROCESSING.

Does it describe how the information should be displayed for the user to view?  That is OUTPUT

 

Slide 4:

Problem 1:

Calculate Mr. Blue’s wage when given the number of hours worked (23) and his hourly rate of pay ($5.25).  The output should be in sentence form stating his name and wage.


READ THE PROBLEM: Can you identify the key parts and identify them as Input, Process, or Output?

 

Slide 5:

Problem 1 (INPUT):

Calculate Mr. Blue’s wage when given the number of hours worked (23) and his hourly rate of pay ($5.25).  The output should be in sentence form stating his name and wage.

CLUES: Known facts and raw data:  The name of the person (Mr. Blue), the number of hours worked (23), and the rate of pay (5.25)

 

Slide 6

Problem 1 (PROCESSING):

Calculate Mr. Blue’s wage when given the number of ours worked (23) and his hourly rate of pay ($5.25).  The output should be in sentence form stating his name and wage.

CLUES:  What needs to be calculated? The wages.
                 Use the formula: wages = hours * rate

 

Slide 7

Problem 1 (OUTPUT):

Calculate Mr. Blue’s wage when given the number of hours worked (23) and his hourly rate of pay ($5.25).  The output should be in sentence form stating his name and wage.

CLUES:  What information should be displayed for the user to view and what format should it be?  A sentence stating the name and wage.

 

Slide 8

On the following slides, read the steps described and determined if it would be part of the Input, Processing or Output.

 

Slide 9

Question: 1

Determine the Hummer’s Miles per gallon during your summer vacation trip.

A = INPUT
B = PROCESSING
C= OUTPUT

 

Slide 10

Question: 2

While driving your Hummer, you use 50 gallons of gasoline to drive 300 miles for your summer vacation to the Smokey Mountains.

A = INPUT
B = PROCESSING
C= OUTPUT

 

Slide 11

Question: 3

Make a table displaying the number of miles driven, gallons of gasoline used and the resulting miles per gallon.

A = INPUT
B = PROCESSING
C= OUTPUT

 

Slide 12

Question: 4

A local supplier has provided a list of school supplies with their costs and the current discount rate.

A = INPUT
B = PROCESSING
C= OUTPUT

 

Slide 13

Question: 5

Calculate the sale price of school supplies purchased at a discount.

A = INPUT
B = PROCESSING
C= OUTPUT

 

Slide 14

Question: 6

Show a sales receipt listing the name of the school supplies purchased, their original cost and their sale cost.

A = INPUT
B = PROCESSING
C= OUTPUT

 

Slide 15

Question: 7

Display a chart showing the distance, time and rate of the migrating birds.

A = INPUT
B = PROCESSING
C= OUTP
UT

 

Slide 16

Question: 8

Bird watchers take not of the distance migrating Canadian geese travel.  The length of times is also recorded.

A = INPUT
B = PROCESSING
C= OUTPUT

 

Slide 17

Question: 9

Find the rate the geese were traveling. Use the following formula:  rate = distance/time

A = INPUT
B = PROCESSING
C= OUTPUT

 

Slide 18

KEYWORDS in BASIC

INPUT – when assigning the raw date you know to variables, us LET.  Soon, you will learn another key word, INPUT.

PROCESSING – when performing calculations, use the LET statement to assign the results to a numeric variable. (missing period on flash)

OUTPUT – The PRINT statement is used to display the results to the output screen for the user to view.

 

Slide 19

If you have any questions about Input, Processing or Output, please contact your instructor.

Check Your Answers

 

previous