Why do we use functions in programming?
Y9 Java (Karel the dog)

Quiz
•
Computers
•
9th Grade
•
Hard
matthew dallimore
Used 18+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
1 min • 1 pt
Makes the code more efficient
Functions take less time to write
The program reads functions at a faster pace
Easier to debug/problem solve a program
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
for(var i = 1; i < 6; i++){
putBall();
How many times will a ball be placed?
5
6
7
8
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
for(var i = 0; i < 8; i++){
move();
How many times will Karel move?
5
6
7
8
4.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
function example() {
for(var i = 0; i < 3; i++){
turnLeft();
}
Karel starts facing East and finishes facing East
Karel starts facing East and finishes facing South
Karel starts facing East and finishes facing West
Karel starts facing East and finishes facing North
5.
MULTIPLE SELECT QUESTION
1 min • 1 pt
Why do we use a for loop in programming
Easier to read
It's more efficient
To repeat an action a number of times
It helps with sequencing
6.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Which code is correct? Karel starts at 0,0.
for(var i = 0; i < 4; i++){
move();
}
putBall();
for(var i = 0; i < 2; i++){
move();
}
putBall();
for(var i = 0; i < 3; i++){
move();
}
putBall();
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
which code is correct? Karel starts at 0,0
for(var i = 0; i < 2; i++){
move();
turnLeft();
move();
}
putBall();
for(var i = 0; i < 3; i++){
move();
turnLeft();
move();
}
putBall();
for(var i = 0; i < 1; i++){
move();
turnLeft();
move();
}
putBall();
Create a free account and access millions of resources
Similar Resources on Quizizz
12 questions
CodeHS Unit 1

Quiz
•
9th - 12th Grade
15 questions
JavaScript Knowledge & Skills

Quiz
•
9th - 12th Grade
11 questions
Unit 2 Knowledge Test Make Up

Quiz
•
9th - 12th Grade
15 questions
CodeHS - Java - Karel (Sec 1-3)

Quiz
•
7th - 10th Grade
14 questions
Intro to Robotics

Quiz
•
9th Grade
10 questions
Python Quiz

Quiz
•
9th Grade
10 questions
AP CSP Worksheet 2

Quiz
•
9th - 12th Grade
12 questions
JavaScript

Quiz
•
9th Grade
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
5 questions
capitalization in sentences

Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance

Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions

Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines

Quiz
•
Professional Development
12 questions
Dividing Fractions

Quiz
•
6th Grade
Discover more resources for Computers
25 questions
Spanish preterite verbs (irregular/changed)

Quiz
•
9th - 10th Grade
10 questions
Identify Slope and y-intercept (from equation)

Quiz
•
8th - 9th Grade
10 questions
Juneteenth: History and Significance

Interactive video
•
7th - 12th Grade
8 questions
"Keeping the City of Venice Afloat" - STAAR Bootcamp, Day 1

Quiz
•
9th - 12th Grade
26 questions
June 19th

Quiz
•
4th - 9th Grade
27 questions
STAAR English 1 Review

Quiz
•
9th Grade
20 questions
Understanding Linear Equations and Slopes

Quiz
•
9th - 12th Grade