Comprehension
Coding
Fill in the blank
What is the Error
Random
100
Java!
What language have we been coding in?
100
System.out.print("Hello");
Write the code to print the word "Hello"
100
int
??? count = 0; HINT: what data type
100
Trick question; there is no error
for(int i = 0; i< 100; i++) { System.out.print("Stephen Curry"); //ERROR }
100
Capitalize the first "S"
Find the error: system.out.println("Hello");
200
Eclipse!
What programming software have we been using to code Java?
200
System.out.println("Hello"); System.out.print("Bob");
Write the code to print the word "Hello" and the word "Bob" ON SEPARATE LINES
200
;
System.out.print("Hello")?
200
Remove the word "then"
int count = 5; if(count > 5) { then System.out.print("Hello"); }
200
NO
Do comments (//) affect the compiler?
300
System.out.println() prints a new line after the command!
What is the difference between System.out.print() and System.out.println()?
300
if(count > 20) { System.out.println(count); }
Write the code for the following scenario: IF the variable count is greater than 20, THEN print the variable count. Hint: IF THEN STATEMENT
300
i++;
int i = 0; while(i<20) { System.out.println("Hello"); ???? }
300
The word "new" is missing before "Scanner(System.in);"
Scanner keyboard = Scanner(System.in);
300
1
The event happening in an If-Then statement occurs how many times?
400
For loop and While loop!
What are the two loops we have learned so far?
400
int i = 0; while(i<20) { System.out.println("Hello"); i++; }
Write a while loop that prints the word "Hello" 20 times.
400
i++
for(int i = 0; i< 100; ???)
400
You need a semicolon at the end
System.out.println("Hello")
400
A comment!
What does "//" mean?
500
0!
Conventionally in java, most for loops start from which number? Hint: for(int a = ?; a < 100; a++)
500
for(int i = 0; i< 100; i++) { System.out.println("Hello"); }
Write a for loop that prints the word "Hello" 100 times.
500
Scanner keyboard = new Scanner(System.? ?); Hint: Allows the user to provide INput
500
You need to write "i++" in the while loop to advance the counter.
int i = 0; while(i<20) { System.out.println("Hello"); }
500
for(int i = 0; i< 1000; i++) { System.out.println("Core Foundations"); }
Write a for loop that prints the words "Core Foundations" 1000 times
M
e
n
u