
Variables
Authored by Nevila Bejko
Computers
10th Grade
Used 30+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Consider the following code:
var a = 0
var b = 2
var c = 6
a = a+b
b=a+c
c=a+b
What are the values of a, b, and c after this code segment has been run?
a= 0 b=2 c=6
a=2 b=6 c=2
a=2 b=2 c=8
a= 2 b=8 c=10
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If you wanted to check to see if two numerical values were equal, which operator would you use in coding?
==
equals
!=
=
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If you wanted to assign a value to some variable, which operator would you use?
==
=
!=
equals
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following is not an action a programmer should take when debugging a segment of code?
Display the value of variables at various points during the program
Ask a friend or collaborator to look over the code segment to see if they are able to find any errors
Delete all the code and re-type it
Check the names of each variable for spelling and capitalization errors
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What is the output to the console after the following code segment is run?
var x = 10;
increase();
x = x+3;
console.log(x);
function increase(){
var x =5}
5
8
10
13
Error. Cannot make a new variable x inside function increase()
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Finding and fixing problems in your algorithm or program
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A placeholder for a piece of information that can change
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?