NEW
Font size
WorksheetsProgramming
Total questions: 33
Worksheet time: 21mins
what is a LOOP function?
something that only happens once
something that gets repeated
_________________ is giving the computer a set of commands.
Debugging
Programming
the Internet
Karel
What is a "bug" in programming?
an error in code
finding and fixing errors in coding
a network
a broken computer
Which Karel command is written correctly?
move;
Putball()
turnLeft();
move(;
Every Karel command ends with a () and a ;.
True
False
Which line contains the bug?
1 and 5
2 only
3 only
5 only
Which command is written correctly?
Move
move
Move();
move();
Which command is written incorrectly?
putBall();
putball();
turnLeft();
takeBall();
Karel is a Cat?
True
False
This code:
putBall();
move();
putBall();
put 2 balls in the same place and then move one place?
True
False
The code in the picture will move Karel in a square.
True
False
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();
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();
A Function takes one command and makes many commands from it.
True
False
Is this Function written correctly?
True
False
What is the name of this function?
function
spin()
3 turnLeft();
spin();
How many times should Karel turn left in order to turn right?
1
2
3
4
What can be used to teach Karel to turn right?
Functions
Variables
Dog Treats
Karel can already turn right
How many times should the start function be defined in a program?
0
1
2
However many you like
How many times should the start function be called in a program?
0
1
2
However many times you like
What is a code comment?
A way to teach Karel a new word
A way to give notes to the reader to explain what your code is doing
A message to your teacher in code
A place to write whatever you want in your code
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
What does this error mean?
missing ( ) { }
missing ;
missing (
there is no function in the program
Why do we use if/else statements in JavaScript?
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
