Unit 1 - Lab 1-Flowchart
Unit 1 - Lab 1-Flowchart
Unit 1 - Lab 1-Flowchart
Lab #1 Flowchart
Amber McLmore
Parker
Assignment Name: LAB 1 (Unit 1)
Name:
Flowchart
Date: 09/23/2014
Procedure
Here Is The Pseudo-Code For An Algorithm To List The Odd Numbers Less Than 10:
1. Output List of Even Numbers less than 10
2. Put 1 in number
3. If number divided by 2 has remainder 0, go to step 5
4. Output number
5. Add 1 to number
6. If number is less than 10, go back to step 3
7. End
Step #1 Modify the above algorithm to list even numbers, and modify it to list numbers
between 20 and 40 (starting with 20 and ending with 40). Write your pseudo-code using
Microsoft Word.
1.
2.
3.
4.
5.
6.
7.
Step #2 Draw a flowchart (preferably using Microsoft Visio) for the algorithm you have
written.
Page 1 of 6
UNIT 1
Lab #1 Flowchart
List Numbers 20 to 40
Yes
No
Output Number
Add 1 to number
Yes
If number is less
than 41
No
End
Task 2
Procedure
PROBLEM STATEMENT: Alice And Bobby Each Run A Qualifying Lap. The Algorithm
Should Input The Two Racers' Times, Decide Which Is The Fastest, And Output The
Answer.
Here Is The Pseudo-Code For An Algorithm Solving The Problem.
1. Output Racer Times Program
2. Output "What was Alice's time?"
3. Input alice_time
4. Output "What was Bobby's time?"
5. Input bobby_time
6. Is alice_time < bobby_time? If no, go to step 9
7. Output "Alice was the fastest"
8. Go to step 10
9. Output "Bobby was the fastest"
10.
End
Page 2 of 6
UNIT 1
Lab #1 Flowchart
Draw A Flowchart (Preferably Using Microsoft Visio) For The Pseudo-Code Above.
Run Racer Time Program
Output Racer Time
Program
Output What was Alice s
Time?
Input alice_time
Output What was Bobby s
Time?
Input bobby_time
No
Yes
Go to End
End
Page 3 of 6
UNIT 1
Task 3:
Lab #1 Flowchart
Procedure
PROBLEM STATEMENT:
Algorithm Should Input The Three Racers' Times, Decide Which Is The Fastest, And Output
The Answer.
Here Is The Pseudo-Code For An Algorithm Solving The Problem.
1. Output Racer Times Program
2. Output "What was Alice's time?"
3. Input alice_time
4. Output "What was Bobby's time?"
5. Input bobby_time
6. Output "What was Charli's time?"
7. Input charli_time
8. Is alice_time < bobby_time? If no, go to step 14
9. Is alice_time < charli_time? If yes, go to step 12
10.
11.
Go to step 18
12.
13.
Go to step 18
14.
15.
16.
Go to step 18
17.
18.
End
Draw A Flowchart (Preferably Using Microsoft Visio) For The Pseudo-Code Above.
Hint: You Can Use The Work You Did For Task 2 And Extend It For This Task, Rather Than Starting Over.
Page 4 of 6
UNIT 1
Lab #1 Flowchart
Input bobby_time
Output What was
Charlie s Time?
Input Charli_time
NO
Yes
Is alice_time <
charli_time?
Yes
No
Go to End
Go to End
Yes
Is bobby_time <
charli_time?
No
Go to End
Page 5 of 6
UNIT 1
Lab #1 Flowchart
Page 6 of 6