var x = 150
var y = 75
What is the value of the y variable?
Variables
Quiz
•
Andrea Lemonds
•
Computers
•
9th - 12th Grade
•
1 plays
•
Medium
Student preview
12 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
var x = 150
var y = 75
What is the value of the y variable?
150
75
225
Infinity
2.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
In the following code, we define a variable and use it to draw a rectangle:
var rectWidth = 20;
rect(10, 10, rectWidth, rectWidth);
How wide is the rectangle?
Not wide enough
10
20
30
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
In the following code, we define two variables, w and h, and use them to draw an ellipse and a rectangle:
var w = 20;
var h = 15;
rect(10, 10, w, h);
ellipse(10, 10, w, h);
How tall is each one of the shapes?
5
35
20
15
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
The following code draws a face with a mouth (with no eyes!), using two variables:
var faceS = 100;
var mouthS = 30;
ellipse(200, 200, faceS, faceS);
ellipse(200, 220, mouthS, mouthS);
How wide is the second ellipse that draws the mouth?
30
200
100
130
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
A variable is a way to store _______.
vapors
verbs
values
vegetables
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which is the correct way to write a variable?
var = X
X = 299
var = 299
var X = 299
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which of these is a valid variable name?
leaf_1
myVar#!
$%90);
12bucklemyshoe$
Explore all questions with a free account
16 questions
Javascript Basics
Quiz
•
9th - 12th Grade
15 questions
Python-Basic
Quiz
•
3rd Grade - University
15 questions
JavaScript Basics
Quiz
•
12th Grade - University
15 questions
Javascript Drawing
Quiz
•
8th - 12th Grade
10 questions
Graphics Programming Review
Quiz
•
8th - 10th Grade
14 questions
p5.js Week1 PREtest
Quiz
•
7th - 12th Grade
15 questions
Hour of Code - Drawing with Code
Quiz
•
6th - 12th Grade
11 questions
8.3 Intro to JS Variables
Quiz
•
12th Grade
39 questions
Respect and How to Show It
Quiz
•
6th Grade
20 questions
math review
Quiz
•
4th Grade
20 questions
Math Review - Grade 6
Quiz
•
6th Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
20 questions
Taxes
Quiz
•
9th - 12th Grade
10 questions
Human Body Systems and Functions
Interactive video
•
6th - 8th Grade
20 questions
Multiplication Facts
Quiz
•
3rd Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
20 questions
Taxes
Quiz
•
9th - 12th Grade
20 questions
Investing
Quiz
•
9th - 12th Grade
20 questions
EOC Math 1 Review
Quiz
•
9th Grade
20 questions
Insurance
Quiz
•
9th - 12th Grade
20 questions
Act 1 of Romeo and Juliet
Quiz
•
9th Grade
20 questions
Common Grammar Mistakes
Quiz
•
7th - 12th Grade
20 questions
Paying for College
Quiz
•
9th - 12th Grade