Comprehension
Coding
Fill in the blank
What is the Error
JKarel
100
What language have we been coding in?
Java!
100
Write the code to print the word "Hello"
System.out.print("Hello");
100
??? count = 0; HINT: what data type
int
100
What's the error? for(int i = 0; i< 100; i++) { System.out.print("Stephen Curry"); //ERROR }
Trick question; there is no error
100
Is there a turnRight() method in the Robot class?
No
200
What programming software have we been using to code Java?
Eclipse!
200
Write the code to print the word "Hello" and the word "Bob" ON SEPARATE LINES
System.out.println("Hello"); System.out.print("Bob");
200
What is this line of code missing? System.out.print("Hello")?
;
200
int count = 5; if(count > 5) { then System.out.print("Hello"); }
Remove the word "then"
200
Robot karel = new Robot(); //Now write the method to make karel move one space forward
karel.move();
300
What is the difference between System.out.print() and System.out.println()?
System.out.println() prints a new line after the command!
300
Write the code for the following scenario: IF the variable count is greater than 20, THEN print the variable count. Hint: IF THEN STATEMENT
if(count > 20) { System.out.println(count); }
300
int i = 0; while(i<20) { System.out.println("Hello"); ???? }
i++;
300
Scanner keyboard = Scanner(
System.in
);
The word "new" is missing before "Scanner(
System.in
);"
300
Robot karel = new Robot() creates a new Robot named........
karel
400
What are the two loops we have learned so far?
For loop and While loop!
400
Write a while loop that prints the word "Hello" 20 times.
int i = 0; while(i<20) { System.out.println("Hello"); i++; }
400
for(int i = 0; i< 100; ???)
i++
400
What is this line of code missing? System.out.println("Hello")
A semicolon at the end
400
To turn right in JKarel, what must you do?
turn left 3 times
500
Conventionally in java, most for loops start from which number? Hint: for(int a = ?; a < 100; a++)
0!
500
Write a for loop that prints the word "Hello" 100 times.
for(int i = 0; i< 100; i++) { System.out.println("Hello"); }
500
Scanner keyboard = new Scanner(System.? ?); Hint: Allows the user to provide INput
System.in
500
int i = 0; while(i<20) { System.out.println("Hello"); }
You need to write "i++" in the while loop to advance the counter.
500
Write an if-then statement for the following scenario....... IF the left is clear, THEN turn left. Use karel as the robot.
if(karel.leftIsClear()) { karel.turnLeft(); }
Continue
ESC
Reveal Correct Response
Spacebar
M
e
n
u
Team 1
0
+
-
Java Bootcamp Jeopardy
No teams
1 team
2 teams
3 teams
4 teams
5 teams
6 teams
7 teams
8 teams
9 teams
10 teams
Custom
Press
F11
Select menu option
View > Enter Fullscreen
for full-screen mode
Edit
•
Print
•
Download
•
Embed
•
JeopardyLabs