# Excersise 1

Topics: Flowchart, Pseudocode, Activity diagram Pages: 6 (492 words) Published: September 19, 2013
Week 1 Activity—Pseudocode and Visual Basic
-------------------------------------------------
TCO 1—Given a simple business problem, design and desk-check a solution that is expressed in terms of pseudocode, flowchart, and/or input-process-output (IPO) diagrams. -------------------------------------------------

Assignment
This activity will assist you in the understanding of how output should appear after statements are executed (results) and how to write proper pseudocode, as well as the relationship between pseudocode, flowcharts, and programming language code. 1. Show the result of each pseudocode program.

2. Also rewrite the pseudocode statements or flowchart using Assignment statements. Rubric
When completed, compile the following documents together neatly in order. 1) This instruction sheet first
Point distribution for this activity:
Activity|
Problem #1| 6| |
Problem #2| 6| |
Problem #3| 8| |
Total Points| 20| |

Example

The variable A starts with value 5.
Display the value of A on the screen.

Example Output
-------------------------------------------------

-------------------------------------------------
6
-------------------------------------------------

Example Pseudocode
-------------------------------------------------

-------------------------------------------------
Let A = 1
-------------------------------------------------
Let A = A + 1
-------------------------------------------------
Output A
-------------------------------------------------

Example flowchart (use MS Visio and paste flowchart here or submit in separate file)

Problem #1

The variable X starts with the value 0.
The variable Y starts with the value 5.
Add X and Y, and store the result in Y.
Display the value in Y on the screen.

Output #1
-------------------------------------------------
6
-------------------------------------------------

-------------------------------------------------

Pseudocode #1
-------------------------------------------------
Let x = 0
-------------------------------------------------
Let y = 5
-------------------------------------------------
Let x = x + 1
-------------------------------------------------
Let y = y +1
-------------------------------------------------
Let y = x + y
-------------------------------------------------
Output y
-------------------------------------------------

-------------------------------------------------

-------------------------------------------------

-------------------------------------------------

-------------------------------------------------

-------------------------------------------------

-------------------------------------------------

Flowchart (use MS Visio and paste flowchart here or submit in separate file)

Problem #2
The variable J starts with the value 10.
The variable K starts with the value 2.
The variable L starts with the value 4.
Store the value of J times K in J.
Store the value of K times L in L.
Add J and L, and store the result in K.
Display the value in K on the screen.
Output #2
-------------------------------------------------
28
-------------------------------------------------

-------------------------------------------------

Pseudocode #2
-------------------------------------------------
Let J = 10
-------------------------------------------------
Let K = 2
-------------------------------------------------
Let L = 4
-------------------------------------------------
Let J =J * K
-------------------------------------------------
Let L = K * L
-------------------------------------------------
Let K = J + L...