stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
ECS Programming Review 1 Flashcards | StudBud
Explore
/
ECS Programming Review 1
ECS Programming Review 1
21 terms
·
StudBud Administration
·
79 plays
Imported from external platform
Flashcards
21 cards
F
Practice quiz
P
Host live
L
Questions
21
Answers
1
What is your favorite thing to do on a break from school?
Hang out with friends
SLEEP!!
Relax + Recharge
Eat good food!
2
What type of data does a float hold?
an image
a whole number
an integer
a decimal value
3
What will the following line of code print?
"Ezra has 10 apples."
Ezra has apples apples.
Ezra has 10 apples.
Ezra has "10" apples.
4
Which of the following shows concatenation?
console.log("Hello");
console.log(2 + 2);
console.log("Hello " + name);
console.log(2 / 3);
5
What would you prefer to see most on the exam?
write a short program in CodeHS
make a mini program in MakeCode
explain in a short response what is happening in a block of code
something else
6
What does a variable do in programming?
keeps something safe for us
password protects our program
stores a value
changes a value
7
What will print when the following code runs?
Gael
Gabriel
Priya
The program will crash
8
When do we use "let" in JavaScript?
When we want to initialize a variable
When we want to run our code
When we want to call a function
When we want the program to let us do something
9
Which line of code will print: He said, "Hello!"
console.log("He said Hello!");
console.log("He said, " Hello!"");
console.log("He said, \"Hello!\"");
console.log(He said "Hello!");
10
Which variable below has a value assigned to it?
if (apples < 5){...}
apples = 5;
let apples;
add(apples);
11
What does the following line of code do? Choose the BEST answer
asks the user for their name
asks the user for their name and stores that value in the variable "name"
creates a name variable
asks the user to code the rest of the program so you don't have to
12
Which of the following is NOT a logical operator in JavaScript?
&&
+
!
||
13
Why do we use if/else statements in programming?
To perform mathematical operations
To make decisions and execute different code based on conditions
To define variables
To create loops
14
In which real-life scenario might we use an if/else statement?
Baking a cake
Deciding what to wear based on the weather forecast
Driving a car
Listening to music
15
How many
possible
values are there for hasWon?
2
1
0
3
16
What will the following code print?
The program will not print anything.
You need to clean your room
The program will produce an error when we run it
Your bedroom is all clean, so you can relax.
17
Which of the following is the way to say the following: <=
greater than or equal to
greater than
less than
less than or equal to
18
What is concatenation?
to link or join things together in a series or chain
to add one value to another
to execute a specific part of the code based on conditions being met
to compare two sides of an expression in our code
19
What is a function in programming?
a chunk of code for the computer to figure out
set of instructions that performs a specific task
a block of code that runs a set number of times
a block of code that runs only when a certain condition is true
20
Which of the following is NOT a data type?
string
Boolean
float
text
21
Which is the proper way to initialize a variable and assign it a value?
console.log(name);
let ticketsSold = 5;
let oranges;
runSpeed = 10;