No student devices needed. Know more
20 questions
A piece of code that you can easily call over and over again.
Repeaters/Do-Overs
Functions/Methods
Procedures
Algorithms
What can be used to teach Karel to turn right?
Functions/Methods
Variables
Dog treats
Karel already knows how to turn right
Loops
Which of the following can be used to comment in the code?
/
//
///
////
/* ... */
If Karel is not on a tennis ball, and all directions around are clear, what will happen when running this code?
Karel will not do anything
Karel will go into an infinite loop
Karel will put down a tennis ball
Karel will turn left once
Which command is written incorrectly?
putBall();
putball();
turnLeft();
takeBall();
The code in the picture will move Karel in a square.
True
False
Which code will put Karel in the position shown in second world?
putBall(); putBall(); move(); move();
move(); putBall(); move(); putBall();
putBall(); move(); putBall(); move();
move(); putBall(); putBall(); move();
Which code below will put Karel in the position shown in picture?
move(); Move(); turnLeft(); move();
move; move(); turnLeft; move();
move(); move(); TurnLeft(); Move();
move(); move(); turnLeft(); move();
What commands does SuperKarel know that regular Karel does not?
turnLeft() and jump()
turnRight() and jump()
turnAround() and turnRight()
turnAround() and jump()
How many times does Karel move with this loop?
9
0
10
1
Why do we use if/else statements?
To repeat something for a fixed number of times
To either do something if a condition is true or do something else
To break out of some block of code
To repeat something while a condition is true
Why do we use methods in programming?
Break down code into smaller, more readable parts
Teach Karel (AKA the computer) new things
Because sometimes code gets really repetitive
All of the above
Explore all questions with a free account