
Game Lab - Variables
Authored by Tim Helland
Computers
7th - 12th Grade
Used 28+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
6 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Choose all of the blocks that create a new variable in Game Lab.
Answer explanation
To create a variable, the JavaScript keyword var should be present. Otherwise, you are attempting to use an existing variable.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Every block in Game Lab represents a piece of Javascript code.
True
False
Answer explanation
When you use blocks in Game Lab, you are really dragging around pieces of Javascript code.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the final value of x when this program runs?
3
4
0
Nothing. An error will occur.
Answer explanation
This is valid code. x will have the same value as y because of the last code block.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What should be changed about this code?
Nothing. It is the best way to write this code.
The blocks should be reordered.
The variable names don't match.
You must always set a variable to equal a number.
Answer explanation
The blocks should be reordered so that x is defined before it is used in other blocks.
A variable should be declared with the var keyword before it is used elsewhere.
Note: Due to how Javascript works, this code will run either way. But, it is best practice to reorder these blocks.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which statement is most accurate about this code?
The program will not run.
The ellipse is very wide.
The ellipse is at the right.
The ellipse is at the left
The ellipse is very tall.
Answer explanation
The correct code should have been to put width in the 3rd spot.
But, it will still work as is. The "x" value of the ellipse will be 400. This moves it to the far right.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is wrong with this code?
x has been declared more than once using var.
Values should not exceed 100.
Nothing. It is perfectly fine as is.
Answer explanation
The correct code should look like this.
You should only declare the same variable one time using the var keyword.
Note: This won't show an error in Game Lab, but it isn't correct.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
Network
Quiz
•
10th - 11th Grade
10 questions
ICT 9 Quiz 1
Quiz
•
9th Grade
10 questions
ZOOM QUIZ
Quiz
•
1st - 12th Grade
11 questions
Computer Education 7
Quiz
•
7th Grade
10 questions
hardware and software(g3)
Quiz
•
2nd - 10th Grade
10 questions
EMPTECH L4 Q3
Quiz
•
12th Grade
9 questions
Microbit Features Activity
Quiz
•
6th - 8th Grade
10 questions
Microcontroller
Quiz
•
11th Grade - University
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade