CS108l computer Science for All Week 6: Actual Quiz Questions
Date conversion 09.06.2017 Size 20.24 Kb.
Computer Science for All
Actual Quiz Questions
Why do modelers use abstraction to create models and simulations?
Modelers use abstraction to make things easier to draw.
Modelers use abstraction because making things abstract to make things more difficult to understand so it keeps it private.
***Modelers use abstraction to simplify a problem so that it can be modeled.
Modelers use abstraction to make things more beautiful.
Modelers use abstraction to clarify the solutions to a problem.
What is a variable in computer science?
A variable is something that changes like the weather.
*** A variable is a memory storage location referenced by a name and containing a value that can be used and changed.
A variable is the part of the code that changes by itself.
A variable is a change in the programming language used when creating a program.
A variable is the letter x.
What is a ?
A variable that can only be used by one agent.
***A variable that can only be used in the procedure or command block where it is declared.
A variable that contain information about agents in the local environment.
A variable that is of interest to locals.
A variable that can only be used by local agents.
What is an ?
***A variable where each agent has its own separate memory location for that variable.
A variable where an agent must be on the patch where the variable is created.
A variable that tells a patch which turtles it contains.
A variable that tells a patch which agents it contains.
A variable that is transferred between different agents.
What is a ?
A variable can hold many different values at the same time.
A variable that can only be accessed from outside the program.
***A single chunk of memory that is shared by and can be accessed by all parts of a program.
A variable used in models that affects the whole world such as climate models, human population models and models of the ocean currents.
A variable that can only be used in the procedure in which it was declared.
In NetLogo, what four ways can be used to input from the Interface tab?
***Slider, Switch, Chooser and Input Box.
Slider, Changer, Chooser and Plot.
Switch, Changer, Monitor and Input Box.
Switch, Monitor, Plot and Chooser.
Slider, Switch, Monitor and Plot.
What is the shape of the NetLogo world when both horizontal and vertical wrapping is turned on?
***A torus (doughnut)
A kite shape
What is a Radio Frequency Identification tag (RFID)
An electronic identification system that can only be used for official government purposes on important items.
A sequence of 4 letters used to identify both public and private radio stations.
***Something containing electronically stored information that can be both powered from a few feet away and read from a few feet away.
Silicon chips embedded in plastic that require small batteries or some other internal power source to transmit their ID number.
A radio that has a tag that can be used to identify the station that is playing.
In the following segment of NetLogo code, the programmer intended that each turtle would keep track of its energy. Each turtle is supposed to start with energy equal to 100 and lose 0.05 energy each time the “ go” procedure is called. Assume that the program also contains a “ setup” procedure (called before the go procedure) and a “ moveTurtle” procedure. What is the error in this “ go” procedure?
set energy (energy - 0.05 )
***A turtle’s energy cannot be set outside of ask turtles [ ]
The parentheses in the set command must be removed.
The procedure must first set the energy to 100.
Each turtle is not losing energy as it is walking.
The parentheses in the set command must be replaced with square brackets.
In a NetLogo program with max-pxcor = 10, max-pycor = 10 and the location of the origin at the center, what is the value of the variable myCount after the setup procedure below is called?
let myCount 0
if (myCount < 50 )
set pcolor red
set myCount (myCount + 1 )
The database is protected by copyright ©ininet.org 2016