Name:
Class:
Date:
Page 1
Indicate whether the statement is true or false.
1. Pseudocode is not standardized, each programmer has his/her own version.
a.
True
b.
False
2. A processing item in an IPO chart represents an intermediate value that the algorithm uses when processing the input
into the output.
a.
True
b.
False
3. The main reason for desk-checking an algorithm is to check for spelling errors.
a.
True
b.
False
4. To ensure the algorithm is working correctly, a programmer should desk-check it using both valid and invalid data.
a.
True
b.
False
5. Pseudocode uses standardized symbols to visually depict an algorithm.
a.
True
b.
False
6. You need to use both pseudocode and a flowchart when planning an algorithm.
a.
True
b.
False
7. The final step in the problem-solving process is to desk-check the program.
a.
True
b.
False
8. When using flowcharts, the input/output symbol is represented by an oval.
a.
True
b.
False
9. When using flowcharts, the processing symbol is represented by a rectangle.
a.
True
b.
False
10. You need to consider all information when analyzing a problem, even if it is unnecessary to the solution.
a.
True
b.
False
Indicate the answer choice that best completes the statement or answers the question.
11. The algorithm is recorded in which section of the IPO chart?
Name:
Class:
Date:
Page 2
a.
input
b.
processing
c.
output
d.
all sections
12. To be sure an algorithm works correctly, you should desk-check it several times using which of the following?
a.
valid data only
b.
invalid data only
c.
both valid and invalid data
d.
invalid data only if valid data works correctly
13. Review the following pseudocode. What type of item is sales tax rate?
1. enter the sale price and sales tax rate
2. calculate the cost by multiplying the sale price by the sales tax rate and then adding the result to the sale price
3. display the cost
a.
processing
b.
output
c.
code
d.
input
14. Most algorithms begin with instructions to do which of the following?
a.
perform calculations
b.
print results
c.
enter input items
d.
output user instructions
15. What type of value does a processing item represents when processing the input into the output?
a.
beginning
b.
intermediate
c.
final
d.
sentinel
16. In a pseudocode algorithm, what part of language should each instruction begin with?
a.
adverb
b.
noun
c.
article
d.
verb
17. Which of the following uses standardized symbols to visually depict an algorithm?
a.
Venn diagram
b.
IPO chart
c.
pseudocode
d.
flowchart
18. What is used to connect the different symbols in a flowchart?
a.
dots
b.
hash marks
c.
flowlines
d.
algorithms
19. Which of the following best represents the goal of the problem-solving process?
a.
input
b.
output
c.
processing
d.
program
20. Which step comes after you plan the algorithm in the problem-solving process?
a.
analyze the problem
b.
desk-check the algorithm
c.
code the algorithm into a program
d.
evaluate and modify the program
21. In the following pseudocode, which item is considered a processing item?
1. enter the midterm score and final score
2. calculate the sum by adding together the midterm score and final score
Name:
Class:
Date:
Page 3
3. calculate the average score by dividing the sum by 2
4. display the average score
a.
midterm score
b.
sum
c.
final score
d.
average
22. What do some programmers use to organize and summarize the results of a problem analysis?
a.
Low-Flo diagram
b.
IPO chart
c.
POI diagram
d.
Sequence-Seletion-Iteration chart
23. In which column of the desk-check table do you enter the expected output of the following algorithm?
1. enter the sale price and sales tax rate
2. calculate the sales tax by multiplying the sale price by the sales tax rate
3. calculate the cost by adding the sales tax to the sale price
4. display the cost
Desk-check Table:
sale price sales tax rate sales tax cost
a.
cost
b.
sales tax
c.
tales tax rate
d.
sale price
24. What does the rectangle symbol in a flowchart represent?
a.
start/stop
b.
input/output
c.
processing
d.
branching
25. What is the second step in the problem-solving process?
a.
analyze the problem
b.
code the algorithm into a program
c.
write the documentation
d.
plan the algorithm
26. Which of the following best describes a computer program that is implemented with a computer?
a.
diagram
b.
problem
c.
flowchart
d.
solution
27. What type of chart helps programmers organize and summarize the results of the analysis step?
a.
flow
b.
pseudocode
c.
IPO
d.
ROI
28. What does the parallelogram symbol in a flowchart represent?
a.
start/stop
b.
input/output
c.
processing
d.
branching
29. Which of the following pseudocode statements represents output?
a.
display the miles per gallon
b.
calculate the mile per gallon
c.
enter the miles driven
d.
divide the miles driven by gallons used
30. Which of the following would be an example of invalid data?
Name:
Class:
Date:
Page 4
a.
an age between 1 and 100
b.
a negative tax rate
c.
a random number between 0 and 1
d.
a selling price of $1000
31. What does the oval symbol in a flowchart represent?
a.
start/stop
b.
input/output
c.
processing
d.
branching
32. What is another name for desk-checking?
a.
charting
b.
drawing
c.
hand-tracing
d.
checking syntax
33. What is the first step in the problem-solving process?
a.
analyze the problem
b.
plan the algorithm
c.
code the algorithm into a program
d.
write the documentation
34. What programming technique allows programmers to jot down their ideas using a human-readable language without
having to worry about the syntax of the programming language itself?
a.
Venn diagram
b.
IPO chart
c.
pseudoode
d.
flowchart
35. In the following pseudocode algorithm, which of the following is considered a processing item?
1. enter the sale price and sales tax rate
2. calculate the sales tax by multiplying the sale price by the sales tax rate
3. calculate the cost by adding the sales tax to the sale price
4. display the cost
a.
sales tax
b.
sale price
c.
tax rate
d.
cost
36. In the following pseudocode algorithm, what is the output given the following inputs?
sale price=2.00
sales tax rate=6%
1. enter the sale price and sales tax rate
2. calculate the cost by multiplying the sale price by the sales tax rate and then adding the result to the sale price
3. display the cost
a.
2.00
b.
2.06
c.
2.12
d.
.12
37. In this chapter you were introduced to flowcharts and pseudocode as two methods of planning algorithms. From what
you have seen of each, which do you initially prefer to use? Why?
38. Why is the use of an IPO chart so important to the problem-solving process?
39. What is the difference between valid data and invalid data? Give an example of each.
Name:
Class:
Date:
Page 5
40. Why is it important to desk-check the algorithm? Explain your answer.
41. In which problem-solving step would you expect to spend the most time? Why?
42. Why would making a modification, such as changing the order of steps, to a flowchart be easier than making the same
modification to pseudocode? Explain your answer.
43. What role would the user of a program being written play in the development of the program?
44. Give an example where a programmer may want to use a combination of pseudocode and flowchart in designing a
solution to a problem.
45. Explain the importance of the Analyze the Problem step of the problem-solving process. What are the two most
important components?
Name:
Class:
Date:
Page 6
Name:
Class:
Date:
Page 7
Name:
Class:
Date:
Page 8