
Algorithms

Quiz
•
Computers
•
3rd - 12th Grade
•
Hard
Brenda McLachlin
Used 4+ times
FREE Resource
13 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What should I do if I want to change the image in the draw function by clicking?
var draw = function() {
image(img, 200, 200, 150, 150);
};
Move the image function into an if (mouseIsPressed) statement
Move the image function into a mouseClicked function
Reassign img at the top of the code
Reassign img in a mouseClicked function
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Fill in the blank with code that will make sure the update(); function is called every 20 seconds?
var draw = function() {
if (_____________) {
update();
}
};
second() / 20 === 1
tick++ % 20 === 1
second() % 20 === 0
seconds - 20 === 0
3.
FILL IN THE BLANK QUESTION
1 min • 1 pt
Fill in the first line of this switching algorithm with proper JS style:
_________
b = a - b;
a = a - b;
4.
FILL IN THE BLANK QUESTION
1 min • 1 pt
Fill in the middle line of this switching algorithm with proper JS style:
a = a + b;
_________
a = a - b;
5.
FILL IN THE BLANK QUESTION
1 min • 1 pt
Fill in the bottom line of this switching algorithm with proper JS style:
a = a + b;
b = a - b;
_________
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Fill in the missing pseudocode to check if all the numbers in array nums are less than 10:
declare singleDigit to be true
for every value in nums do:
___________________
set singleDigit to false
check if singleDigit is true
check if the value in nums is less than 10
check if the value in nums is greater than/equal to 10
check if the current index is less than the length of nums
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Fill in the pseudocode so the password checker accepts "coach brenda" and "coach dylan" as answers
declare variable pass to be an empty string
while (________)
display text "What's the password?
prompt user for string input
pass !== "coach brenda" || pass !== "coach dylan"
pass !== "coach " + pass
pass !== "coach brenda" && pass !== "coach dylan"
pass !== pass
Create a free account and access millions of resources
Similar Resources on Wayground
14 questions
Javascript Starter

Quiz
•
12th Grade
11 questions
Javascript Lists Lecture Knowledge Check

Quiz
•
9th - 12th Grade
10 questions
python

Quiz
•
10th Grade
15 questions
Basic Data Structures - Intro to CS

Quiz
•
12th Grade
15 questions
Area With Arrays

Quiz
•
10th - 12th Grade
14 questions
Advanced Functions

Quiz
•
6th - 8th Grade
14 questions
List Review Quiz

Quiz
•
9th - 12th Grade
10 questions
Programming basics

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
Discover more resources for Computers
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade