Random Computer Facts
Basic Karel
Commands
Functions/Commenting
Conditional Statements/Loops
100
Why do computers have fans?
In order to keep them from overheating.
100
How do you command Karel to move?
What is move();
100
How do you command Karel to move?
What is move();
100
How many times should the start function be defined in a program?
What is 1.
100
Which of the following is not a condition a. frontIsClear b. leftIsBlocked c. isFacingNorth d. notFacingWest
What is c.
200
Who was the creator of the apple computer?
What is Steve Jobs.
200
What is a "street" in Karel World?
What is a row.
200
How many times should Karel turn left in order to turn right?
What is 3.
200
What is a code comment?
What is A way to give notes to someone who is reading your code and explain what is happening
200
Why do we use while loops in JavaScript?
What is to repeat some code while a condition is true.
300
What is the language in which computer's "communicate"
What is binary code.
300
What is an "avenue" in Karel world?
What is a column.
300
Write the commands that follow the turnRight function
What is turnLeft(); turnLeft(); turnLeft();
300
How do you begin to comment a code?
What is // double backslash
300
What does an if/else statement look like in JavaScript? a.) if (condition) { //code } b.) for (var i = 0; i < count; i++) { //code } c.) if (condition) { //code } if (condition) { //code } d.) if (condition) { //code } else { //code }
What is d.
400
The first computer was invented in the 1930s. What was the exact year that the computer was born?
What is 1936.
400
Which one of the following is not a command that super Karel knows? a.) putBall b.) turnAround c.) turnRight d.) Karel knows all of the above
What is d.
400
If Karel is facing North and the code: turnLeft(); turnLeft(); runs, which direction is Karel facing now?
What is South.
400
Write a function will teach Karel how to spin a circle one time?
What is function spin(){ turnLeft(); turnLeft(); turnLeft(); turnLeft(); }
400
Write one example of a while statement
Answers will vary while (condition) (){ command(); }
500
Where did the term "computer bug" come from?
What is a moth that had died inside of a computer.
500
What is the color of Karel's collar?
What is black.
500
How would you command Karel to move forward two spaces, drop two balls, face north, and finally pick up 2 balls?
What is move(); move(); putBall(); putBall(); turnLeft(); takeBall(); takeBall();
500
Make corrections to the following function: function buildtower{ putball; putball; putball; }
What is function buildTower(){ putBall(); putBall(); putBall(); }
500
What is wrong with the following code? while (var i=0; i < 10; i+){ turnLeft(); }
What is should be i++