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
10 questions
Karel Quizzes 1-5 (Command - Start)

Quiz
•
9th - 12th Grade
9 questions
Programming with Karel

Quiz
•
9th - 12th Grade
7 questions
Basic Karel Review

Quiz
•
9th - 12th Grade
15 questions
Linux-2 Quiz 2 -- LAMP

Quiz
•
1st - 12th Grade
15 questions
Functions and Parameters Quiz

Quiz
•
9th - 12th Grade
14 questions
CSAwesome 3.6.1Equivalent Boolean Expressions

Quiz
•
9th - 12th Grade
13 questions
JavaScript Variables

Quiz
•
3rd Grade - University
12 questions
CodeHS Unit 1

Quiz
•
9th - 12th Grade
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University