This quiz covers, readings from “Blown to Bits” (3 questions) and

advertisement
This quiz covers, readings from “Blown to Bits” (3 questions) and NetLogo
general programming with specific focus on week 13.
This quiz consists of 10 multiple choice questions and has a time limit of 25
minutes. Note: Blackboard will show that the quiz is 3 hours. This, however, is for
special cases. Baring special circumstance, the time limit is 25 minutes which will
be enforced by the exam proctor. This quiz must be taken in a single sitting.
Note: students with IEPs accommodations that include extended exam time
should arrange to take the exam during a single time block that is sufficient to
accommodate the student’s needs.
Each student may use a non-electronic English and/or English/other language
dictionary. Note that this must be a non-electronic dictionary as electronic
dictionaries (i.e. the Internet) grants access to far too many resources well
beyond a traditional dictionary.
Each student may use one 8.5x11 sheet of hand written notes (both sides).
Students may NOT use cell phones, smart phones, textbooks, NetLogo, Internet
(other then to access the exam itself in Blackboard Learn), or neighbors.
Once a question has been answered, the student may not return to the question
(this is enforced by the Blackboard Learn software).
Password: AgentPower
Week 13 Possible Quiz Questions:
1) Consider the NetLogo statement:
if (random 1000 < 10)
[ myProcedure
]
a.
b.
c.
d.
e.
myProcedure is always called.
myProcedure is never called.
myProcedure is called about 10% of the time.
***myProcedure is called about 1% of the time.
myProcedure is called about 10 times.
2) Suppose we build a model of fish eating (patch-based) plankton. When the
model is run, at first the fish population greatly increases and the plankton
population drops to near zero. Then, the fish population falls to zero (all the fish
die of starvation). Which change is most likely to make the fish and plankton
populations more stable?
a. Make the newly born fish stay near their parents.
b. Decrease the growth rate of plankton.
c. ***Decrease the birth rate of fish.
d. Increase the movement speed of fish.
e. Decrease the energy fish use when they move.
3. In chapter 3 of Blown to Bits, the authors Lewis, Ledeen and Abelson, claim
that a photograph is_________:
a. only exactly like the real-world original when an analog process is used.
b. only exactly like the real-world original when lossless compression is
used.
c. only exactly like the real-world original when a digital process is used.
d. only exactly like the real-world original when the image is NOT digitally
edited (no “Photoshopping” of the image is allowed).
e. ****a model of the real-world and all models are abstractions.
4. Which of the following is true about image compression as discussed in
chapter 3 of Blown to Bits?
a) All methods of digital image compression greatly reduce the quality of an
image so that the image takes up less digital storage space.
b) All methods of digital image compression reduce the quality of an image, but
some only sacrifice a small amount of quality.
c) **** Some methods of digital image compression have zero loss of image
quality.
d) Large amounts of digital image compression can cause damage to the
computer components.
e) In the United States, digital images that have been compressed are not
admissible in a court of law.
5) In chapter 3 of Blown to Bits, the authors Lewis, Ledeen and Abelson, claim
that inside the computer, digital images, movies, text and sound ______
a. ****are all streams of 0s and 1s.
b. are each stored in different types of memory (i.e. the video card, the
graphics card and the sound card).
c. are stored as miniaturized copies of the originals.
d. are each stored in different analog formats.
e. each are stored in unique symbols particular to the type of media.
6 Within a NetLogo procedure, the code
ask turtles [set energy 10]
will fail UNLESS:
a.
b.
c.
d.
e.
An agentset is called first.
The programmer has defined “turtles” as a breed.
***”Energy” is defined as a turtles-own variable.
10 is not larger than the maximum value defined for energy.
The programmer does not call please before the ask command.
7) In Netlogo, the code:
setxy random-xcor random-ycor
can only be used in which of the following circumstances?
a. ****Inside an “ask turtle“ or “ask“ breed block.
b. After “reset-ticks“
c. Inside a “go” procedure.
d. Inside a “setup” procedure.
e. Inside an “ask-patches“ block.
8) Why does the following code fail?
to grow ;;called by button on the interface.
show count patches
show "Growing"
set color red
ask turtles
[
repeat 3
[
forward 1
right 20
]
]
end
a.
b.
c.
d.
e.
Because “Growing” has not been defined.
Because “Repeat” is not a command.
*** Because “set color” cannot be outside of an “ask turtles” block.
Because “Repeat” cannot be inside an “ask turtles” block.
Because “Count” can only be used with an agentset.
9) What is the final value of n in the NetLogo code below:
let n 10
if (n > 5)
[ set n (n - 2)
]
set pen-size n
a.
b.
c.
d.
e.
-2
***8
10
5
2
10) In a NetLogo program, two turtles have been created when the code
segment below is reached. What values of n are displayed in the NetLogo
command center?
ask turtles
[ let n 10
while [n > 2]
[ forward n
right 15
set n (n - 1)
]
print n
]
a)
b)
c)
d)
e)
10 10
****2 2
3 3
1 1
2 1
Download