Confidential Teaching Materials:
Quiz 1 Grading Criteria
Note: To receive any credit whatsoever, the date, your name, your student number, and your answers must
be legible and readily readable in the judgment of the grader.
Add brief explanatory comments as necessary to make sure your answers are clear and unambiguous
to the grader.
[p1] 40 points
Declare a constant or variable to hold the desired data. Provide a brief justification for each answer. Be sure
to use descriptive names.
a) the name of your favorite television show.
b) the length of your favorite movie(in minutes).
c) whether or not you like cats.
d) a person’s name.
e) a person’s middle initial.
f) number of messages on an answering machine.
g) whether or not that person listened to the messages right when they got home.
h) the number of hours in a day.
[c1]
[p2] 15.0 points
Write an algorithm IN ENGLISH that describes how you log into acme and what you do once you’ve logged in. It
must have at least five steps and one conditional. You do not need to write any pseudocode for this problem!
[c2] 15 points
Confidential Teaching Materials:
Quiz 1 Grading Criteria, Page 2 of 3
Example solution: (many possible reasonable activities and sequences)
-telnet to <hostname>
-type in user-ID
-type in password
-if have new mail then
-check mail for class related messages
-otherwise
-work on class work
[p3] 25.0 points
Write an algorithm, this time in pseudocode, that calculates a user’s overall GPA. To do this you will need to ask
the user for the total number of hours that the user has taken and the total number of quality points that the user
has earned. After the GPA is calculated be sure to print a meaningful message telling the user what their GPA is.
Be sure to prompt the user for all input.
[c3] 25 points
Example solution: (many possible reasonable particulars)
Confidential Teaching Materials:
[p4] 20 points
Fill in the blanks (i.e., {____}) to complete the algorithm below.
{___________________} Triangle_Area
//The following algorithm prompts the user for the height and length
//of a right triangle, then calculates the area of that triangle.
height isoftype Num
base isoftype Num
area isoftype Num
print(“Please enter the length of the base: “)
read(base)
print(“Please enter the height of the triangle: “)
read(height)
{__________________} <- 0.5 * base * {___________________}
{__________________} (“The area of that triangle is: “,area)
{___________________}
[c4] 20 points