Define Variables

Quiz
•
Computers
•
9th - 12th Grade
•
Hard
+1
Standards-aligned
Barbara White
FREE Resource
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
Tags
CCSS.6.EE.B.6
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
A variable is a way to store _______.
vapors
verbs
values
vegetables
Tags
CCSS.6.EE.B.6
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
Tags
CCSS.6.EE.B.6
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which of these is a valid variable name?
leaf_1
myVar#!
$%90);
12bucklemyshoe$
Tags
CCSS.L.1.1B
CCSS.L.2.2C
CCSS.L.3.2D
Create a free account and access millions of resources
Similar Resources on Wayground
9 questions
Unit 5 -- Lists, Loops, Traversals

Quiz
•
9th - 12th Grade
10 questions
Python beginners quiz

Quiz
•
9th - 10th Grade
13 questions
Pensamento computacional p5js

Quiz
•
10th Grade
12 questions
JavaScript viktorīna

Quiz
•
9th Grade
10 questions
AV2b - Pensamento Computacional - Explorando o p5.js

Quiz
•
2nd Grade - University
11 questions
JS: Conditionals!

Quiz
•
6th Grade - University
15 questions
JavaScript Quiz

Quiz
•
9th - 10th Grade
10 questions
Programming Basics Basics

Quiz
•
8th Grade - University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
10 questions
Proper Keyboarding Techniques

Interactive video
•
6th - 10th Grade
14 questions
Inputs and Outputs: Computer Science Intro

Lesson
•
5th - 9th Grade
10 questions
Understanding Computers: Hardware, Software, and Operating Systems

Interactive video
•
7th - 12th Grade
29 questions
AP CSP Unit 2 Review (Code.org)

Quiz
•
10th - 12th Grade