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
2) Your answer sheet second
Point distribution for this activity:
Activity|
Document| Points possible| Points received|
Problem #1| 6| |
Problem #2| 6| |
Problem #3| 8| |
Total Points| 20| |

Example

The variable A starts with value 5.
Add 1 to A
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 1 to X.
Add 1 to Y.
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...
Continue Reading

Please join StudyMode to read the full document

You May Also Find These Documents Helpful

  • MKT 571 Quizzes week 1 6 Essay
  • APUSH Chapter 1 Cornell Notes Essay
  • Maths Paper 1
  • A1 1 2SimpleMachinesPracticeProblems Essay
  • Class 10 Maths Sa-1 Essay
  • eco349 mid summer2 2013 mc sol 1 Essay
  • Printable Flashcard On IT302 Quiz 1 Fr Essay
  • 2014 15 Day 1 and Day 2 BIC Secondary School Calendar 1 Essay

Become a StudyMode Member

Sign Up - It's Free