Algorithm Assignment
Algorithm Assignment
ALGORITHM ASSIGNMENT
Please CIRCLE ONE answer only for each item in this section.
A. Sequencing
B. Selection
C. Iteration
D. Sorting
A. a decision box
B. an input/output box
C. a process box
D. a terminator
A. Repetition
B. Sequencing
C. Ordering
D. Selection
A. Loop
B. Pseudocode
C. Chart
D. Binary Code
1
6. In representing algorithms, which of the following statements would be placed in the
flowchart box shown below?
A. Read A
B. A > 25
C. Count = Count + 1
D. Output C
A. Read
B. Start
C. Accept
D. Write
8. When breaking down a simple problem into its logical steps, what
statement/instruction would the adding of two numbers be?
A. A storage
B. A process
C. An input
D. An output
9. What is the name given to an identifier that always holds the same value?
A. Constant
B. Variable
C. Location
D. Storage
A.
B.
C.
D.
A. Ascending
B. Repetition
C. Sequence
D. Selection
2
12. Which of the following keywords is used to accept value in a pseudocode algorithm?
A. Display
B. Print
C. Read
D. Write
ALGORITHM
Step1 START
Step2 PRINT “Please enter three integers.”
Step3 GET Number1, Number2, Number3
Step4 Avg = (Number1, Number2, Number3)/3
Step5 DISPLAY Avg
Step7 STOP
A. input
B. output
C. processing
D. storage
A. input
B. output
C. processing
D. prompt
A. input
B. output
C. calculation
D. storage
A. input
B. output
C. processing
D. storage
17. What is the MOST appropriate control structure to be used in calculating the total
of ten numbers?
A. If-then-else
B. Repeat-until
C. While-endwhile
D. For-endfor
3
Short Answer Items
Answer all items
1. Suppose you are baking a cake. The recipe states: "Mix the ingredients, bake at 350°F for
30 minutes, then let cool." How is this process similar to an algorithm?
2. You are creating instructions for setting up a new computer. Your steps are:
3. You need to explain how to calculate the area of a rectangle (length × width) to a team of
beginners. Which representation of algorithms would be easiest to use, and why?
4. You are creating an algorithm for a vending machine. If the customer selects an item and
has enough money, the machine dispenses the item. Otherwise, it asks for more money.
Which control structure is being used?