JavaScript isn't enabled in your browser, so this file can't be opened. Enable and reload.
Mid Term Quiz
Choose the *BEST* answer for each question in the context of our class
Sign in to Google
to save your progress.
Learn more
* Indicates required question
First and last Name
*
Your answer
What is an operator?
*
A thing that expresses some mathematical operation: +, -, *, = etc
A structure that can route requests around your program
A bunch of random symbols that do all sorts of things: +, -, *, = etc
The person you talk to when you dial 411
What is a variable?
*
A thing that allows code to vary in a number of ways
A type of construction used to link two disparate structures
A container that can store an assortment of different things: numbers, strings, arrays, etc
Tuna fish sandwich
When programming - when is a good time to use a for loop
*
When you are up late and feeling a little crazy
When you need to add a number to itself
When a while loop just isn't powerful enough
When you find yourself repeating the same code over and over again
Which metaphor is most appropriate for explaining the purpose of a conditional statement
*
When you need to make a decision based on your current situation
To threaten someone who won't do what you want or need them to do
To train a certain aspect of your mind or body
Betting with the odds at a dog race
When programming when is a good time to use a function?
*
When you have code you might want to use again
When you have code that you want to execute at some later and unknown time
To break a complex operation into manageable chuncks
all of the above
Why are events useful?
*
They aren't really - it's just another thing to learn
They allow a program to respond to user input
They help you keep track of what's happening
They can respond to something that happens at an unknown time in the future
What is an effective use of an array?
*
When you have several items that are similar
When you have several items that you have to preform the same operation on
When you don't know the number of items that will be created while using your program
All of the above
What is a class?
*
An object with properties and methods
Something that is created during runtime that holds information about the program
A blue print or description of an object
What do you mean - we're in class now - aren't we?
How do you refer to properties and methods within a class?
*
Ask the class directly with a soothing tone of voice
use the dot operator : somemovieclip.gotoAndStop()
A blue print or description of an object
What do you mean - we're in class now - aren't we?
Short answer
assume that all of the following expressions are written in order in the same program.
var donuts:Number = 2 + 4 * 5;
*
what is the value of donuts?
Your answer
What is the type of the variable donuts?
*
Refers to the question above
Your answer
donuts += 1;
*
assuming the value of donuts was 22 before what is the value after the above operation?
Your answer
donuts = "donuts";
*
assuming we are in the same file - what is the value of donuts after the above expression?
Your answer
trace(donuts);
*
What is the result of the above expression?
Your answer
What is the type of donuts now?
*
Your answer
for(var i = 0; i < 10; i++)
*
what is the value of i at the end of the loop?
Your answer
if ( donuts == "glazed donut") { trace("it's glazed"); }
*
In english - what question is the if asking?
Your answer
if ( donuts == "glazed") { trace("it's glazed"); }
*
assuming all of the above expressions are part of the same program - will the trace statement execute?
Your answer
function make_glaze_donut() :String { return "glazed donut"; }
*
how do you call the above function?
Your answer
function glaze_donut(a_donut:String) :String { return "glaze " + a_donut; } //notice this function is not the same
*
What is the return type of the above function?
Your answer
trace(make_glaze_donut()); //notice this is the first function
*
what will the above expression print to the console?
Your answer
trace(glaze_donut(donut)); //notice this is the second function
*
what does this function return?
Your answer
var bag_of_donuts:Array = ['glazed', 'powered', 'jelly', 'boston cream', chocolate glazed', 'plain'];
*
what is the value of bog_of_donuts[0] ?
Your answer
trace(bag_of_donuts.length);
*
what would this print to the console?
Your answer
var donut_maker:DonutMaker = new DonutMaker();
*
What does the above statement do?
Your answer
Assuming DonutMaker has a "make" method - how would you call it?
*
Your answer
Evaluate logical expressions
This is something you all have to know and get good at. So here are a few problems:
All of the following are Boolean Operators: && (and), || (or), ! (not)
*
True
False
Which actionscript logical expression correctly determines whether the value of some_number lies between 0 and 100?
*
0 < some_number < 100
0 < some_number && some_number < 100
0 > some_number && some_number < 100
0 > some_number && some_number > 100
(4 >= 4 && 8 < 1)
*
Will the above return true or false?
true
false
!(4 >= 4 || 8 < 1)
*
Will the above return true or false?
true
false
( (4 >= 4 && 8 < 1) || (44 == 33 || 5 > 3) )
*
Will the above condition return TRUE or FALSE? (This is a tough one, just think about it)
true
false
If p is a Boolean variable, which of the following logical expressions always has the value FALSE?
*
p && p
p || p
p && !p
p || !p
b and d above
e. a, b, and c above
Submit
Clear form
Never submit passwords through Google Forms.
Forms
This content is neither created nor endorsed by Google.
Report Abuse
Terms of Service
Privacy Policy
Help and feedback
Contact form owner
Help Forms improve
Report