Page 1 of 8 More Alice Multiple-Choice Questions More MORE

advertisement
Page 1 of 8 More Alice Multiple-Choice Questions
1. In Alice, information about a world and its objects are stored in properties. What programming "piece" (statements
and phrases) allows the user to ask questions about these properties?
a. functions
b. instructions
c. control structures
d. expressions
Answer: _____
2. Program code involves various "pieces" (statements and phrases). For each piece, numbered 1 through 4, match
the piece with its associated definition, labeled a through d.
___ 1. instruction
___ 2. control structure
___ 3. function
___ 4. expression
a. asks a question about a condition or computes a value
b. a math operation on numbers or other kinds of values
c. a statement that controls the execution of a block of instructions
d. a statement that executes to make objects perform a certain action
3. In an Alice world, all properties of objects in the world are available in its properties list.
a. True
b. False
Answer: _____
4. Conditional execution makes use of functions and expressions to check a current condition in the world.
a. True
b. False
Answer: _____
5. Alice provides built-in functions to access property information about objects. However, functions are not really
necessary because this property information can be accessed via the properties list.
a. True
b. False
Answer: _____
6. In Alice, objects have built-in functions which allow the programmer to get information about the properties of
objects. These functions are listed on the functions tab of the details panel, which is divided into sub-categories.
Which of the following are sub-categories (rather than a specific built-in function)?
a. opacity
b. proximity
c. spatial relation
d. point of view
Page 2 of 8 More Alice Multiple-Choice Questions
Answers: ____________________
7. What is meant by the phrase, spatial relation?
a. how visible is the object in relation to full opacity (as ghosts and other objects may be slightly invisible)
b. the position of an object in the world, relative to the center of the world
c. orientation, as compared to another object in the world (such as to left of, to right of)
d. none of the above
Answer: _____
8. For objects, a built-in function returns a value of some property being asked about. What types of values may be
returned by built-in functions in Alice?
a. number, boolean, string, object
b. number
c. number or boolean
d. number, boolean, string
Answer: _____
9. An If/Else statement involves making a decision based on a current condition in the world.
a. True
b. False
Answer: _____
10. Arithmetic operations, such as additional, subtraction, multiplication, and division and not possible in Alice.
a. True
b. False
Answer: _____
11. In the firstEncounter example described in the textbook, the task is to move a "spiderRobot" near a rock. Which
solution below is the most effective?
a. experiment with moving the "spiderRobot" various distances while moving its legs, until a good distance
is found
b. move the "spiderRobot" the value of the distance returned by the "spiderRobot distance to rock" built-in
function, while the "spiderRobot" moves its legs
c. move the "spiderRobot" the value of the distance returned by the "spiderRobot distance to rock - the
width of the rock" built-in function, to avoid collision, while the "spiderRobot" moves its legs
d. none of the above
Answer: _____
Page 3 of 8 More Alice Multiple-Choice Questions
12. The distance to function in Alice returns the value of the distance from the center of one object to the center of
another object. Since this returned value is precise, objects in Alice will never collide.
a. True
b. False
Answer: _____
13. Repetition is where a section of the code is run a number of times.
a. True
b. False
Answer: _____
14. Suppose one object is moved toward another object, based on the value returned by the built-in distance to
function between the two objects. Further, when the world is run, these two objects collide. To fix this problem, the
programmer moves both objects some additional distance away from each other before running the world again. Will
this action fix the problem?
a. Yes
b. No
Answer: _____
15. Suppose one object is moved toward another object, based on the value returned by the built-in distance to
function between the two objects. Further, these objects collide when the world is run. How can this collision possibly
be avoided, most effectively?
a. move the position of one object before starting the world
b. use an arithmetic expression to subtract a small value from the distance, as returned by the distance to
function
c. move the position of both objects before starting the world
d. use a "do together" block, coupling the above statement with another statement to move the colliding
object a small distance, so that the net value of both moves results in the objects not colliding
Answer: _____
16. What is a control structure?
a. a programming statement that allows the programmer to control the order in which instructions are
executed
b. a slide which allows the programmer to control how fast the world is played
c. the use of built-in functions specifically written such that collisions can be avoided
d. the ability to resize and reposition an object once it is dragged into the world
Answer: _____
17. The only control structures defined in Alice are the "do together" and "do in order" statements.
a. True
b. False
Page 4 of 8 More Alice Multiple-Choice Questions
Answer: _____
18. Conditional execution and repetition in a program are implemented by using programming statements known as
control structures.
a. True
b. False
Answer: _____
19. The answer to the question, "Is the tree taller than the polar bear?" would be a Boolean.
a. True
b. False
Answer: _____
20. The answer to the question, "Is the tree taller than the polar bear?" would be either true or false.
a. True
b. False
Answer: _____
21. Conditional execution is best described as ____________.
a. when a section of code is run a number of times
b. when some condition is checked and a decision is made about whether (or not) a single instruction in the
program code will be executed
c. the difference between using a "do together" versus a "do in order"
d. when some condition is checked and a decision is made about whether (or not) a certain section of the
program code will be executed
Answer: _____
22. Repetition is best described as _____________.
a. when a section of code is run a number of times
b. when some condition is checked and a decision is made about whether (or not) a single instruction in the
program code will be executed
c. the difference between using a "do together" versus a "do in order"
d. when some condition is checked and a decision is made about whether (or not) a certain section of the
program code will be executed
Answer: _____
23. A boolean value is ____________.
a. an integer
b. a string
c. either true or false
d. the value 0, 1, or -1
Page 5 of 8 More Alice Multiple-Choice Questions
Answer: _____
24. Which of the following control structures implements conditional execution?
a. If/Else statement
b. Loop statement
c. Do together statement
d. Do in order statement
Answer: _____
25. An If/Else statement controls program flow. This flow normally depends on asking a question, where the answer is
always __________.
a. a number value
b. a boolean value
c. a string value
d. an object
Answer: _____
26. Now, with the introduction of If/Else and Loop statements, the use of indentation is no longer necessary for
writing pseudocode in a textual storyboard.
a. True
b. False
Answer: _____
27. Which of the following built-in function calls and expressions are acceptable for use in an If/Else control structure.
a. Is the spiderRobot shorter than the rock?
b. How far is the spiderRobot from the rock?
c. Move the spiderRobot towards the rock.
d. Is the head of the spiderRobot red?
Answers: ____________________
28. It is never acceptable to have the "else" section of an If/Else control structure in Alice, "do nothing".
a. True
b. False
Answer: _____
Page 6 of 8 More Alice Multiple-Choice Questions
29. Six relational operators exist in Alice, grouped together in the math sub-category of a World's built-in functions.
Match each description, labeled 1 through 6, with its appropriate relational operator symbol, labeled a through j.
___ 1. is equal to
___ 2. is not equal to
___ 3. is greater than
___ 4. is greater than or equal to
___ 5. is less than
___ 6. is less than or equal to
a. <=
b. <
c. >>
d. =!
e. =
f. >=
g. !=
h. <<
i. ==
j. >
30. It is possible for the "If" part of an "If/Else" statement to be "do nothing".
a. True
b. False
Answer: _____
Page 7 of 8 More Alice Multiple-Choice Questions
1.
a.
14.
b.
2.
[d] 1. instruction
[c] 2. control structure
[a] 3. function
[b] 4. expression
15.
b.
16.
a.
17.
b.
a. asks a question
about a condition or computes a
value
b. a math operation
on numbers or other kinds of
values
c. a statement that
controls the execution of a block
of instructions
d. a statement that
executes to make objects
perform a certain action
30.
18.
a.
19.
a.
20.
a.
21.
d.
22.
a.
23.
c.
3.
b.
4.
a.
5.
b.
24.
a.
6.
b.
c.
d.
25.
b.
7.
c.
26.
b.
8.
a.
27.
a.
d.
9.
a.
28.
b.
29.
[i] 1. is equal to
[g] 2. is not equal to
[j] 3. is greater than
[f] 4. is greater than or
10.
b.
11.
c.
12.
b.
13.
a.
c. >>
d. =!
e. =
f. >=
g. !=
h. <<
i. ==
j. >
equal to
[b] 5. is less than
[a] 6. is less than or
equal to
a. <=
b. <
a.
Page 8 of 8 More Alice Multiple-Choice Questions
More
Download