CS108L Spring 2013 Week 7: Quiz 1. What is a computer simulation? a) A device that can be used to simulate a computer. b) A computer code that explores how a computer can be used in the real world. c) ****Running the computer model to simulate the passage of time and exploring the behavior of the modeled system. d) An abstraction of the real world that captures the elements of the system and the behavior of the elements being modeled. e) Something that you teacher tells you to do on the computer. 2. What is a deterministic computer simulation? a) A simulation that gives you numbers for an answer. b) A simulation that actually can be used to determine something. c) A simulation that is being run by people who are determined to get the correct answer. d) ***A simulation that does not involve randomness and provides single outputs for each set of inputs. e) A simulation that was written by a very determined programmer. 3. What is a stochastic computer simulation? a) ***A simulation that can produce different outputs for the same set of inputs because randomness is involved. b) A simulation that can be used to develop an understanding of problem based on the chaste system in India. c) A simulation that uses the stochastic algorithm developed by a programmer named Stochast. d) A simulation with inputs that are set using a uniform random distribution. e) A simulation with inputs that are set using a normal random distribution. 4. When performing a simulation using a stochastic model and analyzing the results of the simulation which of the following should you NOT do? a) Sweep or vary the input parameters. b) Repeat simulation runs at each set of input parameters since stochastic models involve randomness and that may vary the outcome.. Document1 c) Record the input parameters that were used to generate each output obtained. d) ***Randomly select input parameters until you get the results you are looking for. e) Test the model by running it with input parameters for which the correct output is known. 5. Why do you need to repeat runs of a stochastic simulation at the same input parameters? a) Because you teacher wants to torture you, repeatedly. b) Because that is what the computer lab tells you to do. c) Because you are not sure you entered the input parameters correctly. d) Because a model that is stochastic, from Greek stokhastikos which means “capable of guessing”, must be validated by showing that the same input parameters always produce the same output. e) ***Because you must average the results for each set of input parameters to get a representative answer. 6. Which of these things is negative feedback for a population of rabbits? a) Plants that rabbits can eat which grows more quickly in the presence of rabbit poop. b) ***A debilitating disease that the rabbits catch when they encounter another rabbit. c) A non-native, rodent species that eats a different kind of plant than the rabbits eat. d) Punishing the rabbits with a small electric shock when they try to exit their safe and protected habitat. e) All of the above. 7. You define a breed in NetLogo by: a) Defining it anywhere in your program using the “set” command, as long as it is defined before you use the breed. b) Defining it anywhere in your program using the “let” command, as long as it is defined before you use the breed. c) Defining it by setting its shape in the setup procedure. d) ***Defining it at the top of your program using the “breed” command. e) Defining it anywhere in your program using the “breed” command, as long as it is defined before you use the breed. 8. What are the three ways to create turtles in NetLogo? a) Create, Spawn, Breed b) ***Create, Sprout and Hatch c) Spawn, Sprout, Breed Document1 d) e) Hatch, Spawn, Make Procreate, Sprout, Breed 9. Will the following NetLogo code hatch any turtles? turtles-own [energy] to go-one-time set energy 0 ask turtles [ forward 1 set energy (energy – 1) if (energy < 0) [ die ] if (pcolor = green) [ set energy (random 25) ] if energy > 10 [hatch 1] ] end a) b) c) d) Yes all the turtles will give birth to turtles. Yes, on average, a bit more than half of the turtles will give birth. Yes, on average, a bit less than half of the turtles will give birth. Maybe yes, maybe no. It depends on the value of (random 25) for each turtle. e) ***No, the turtles will all die because their energy level drops to less than 0 when the turtle moves 10. The reading of Blown-to-Bits says we leave digital fingerprints when we use our computers and access the Internet because_____ a) ***Accessing the Internet means downloading information to the computer, some part of the system must know where we are to do that. This leaves a trail. b) People often choose to fill out forms on the Internet and enter personal information. c) People often choose to use school or company owned computers to access the Internet and these computers are often monitored. d) People sometimes use computers with viruses or other malware which can track all the user’s accesses. e) Even in a dry climate like New Mexico, people always have some oils on their fingers – this is especially true when eating at the keyboard. Document1