grade 11 cs review (unit 1)
TRANSCRIPT
Are You Smarter Than a 5th Grader?Are You Smarter
Than a 5th Grader?
Are You Smarter Than a 5th Grader?
Are You Smarter Than a 5th Grader?
1,000,000
5th Grade Input5th Grade Input 5th Grade Variables
4th Grade Java Structure4th Grade Java Structure 4th Grade Input
3rd Grade Output3rd Grade Output 3rd Grade Errors
2nd Grade Variables2nd Grade Variables 2nd Grade Binary Numbers
1st Grade Hardware1st Grade Hardware 1st Grade Intro to Java
500,000
300,000
175,000
100,000
50,000
25,000
10,000
5,000
2,000
1,000
5th Grade Input Question 5th Grade Input Question
What would happen if the following occurred:
Code:String name = kboard.nextLine(); Input:5.0
What would happen if the following occurred:
Code:String name = kboard.nextLine(); Input:5.0
5th Grade Input Answer 5th Grade Input Answer
The program will have an exception or a run-time error. The program expects the user to input a string but the user inputs a decimal value.
The program will have an exception or a run-time error. The program expects the user to input a string but the user inputs a decimal value.
Return
5th Grade Variables Question 5th Grade Variables Question
Name the three key components involved in naming variables.
Name the three key components involved in naming variables.
5th Grade Variables Answer 5th Grade Variables Answer
The type of variable (string, double, int) The name must be meaningful and
descriptive No spaces/symbols in the names of
variables
The type of variable (string, double, int) The name must be meaningful and
descriptive No spaces/symbols in the names of
variables
Return
4th Grade Java File Structure Question
4th Grade Java File Structure Question
Fill in the missing blanks:1. Source File 2. _____________3. Object Code4. _____________5. Program
Fill in the missing blanks:1. Source File 2. _____________3. Object Code4. _____________5. Program
4th Grade Java File Structure Answer
4th Grade Java File Structure Answer
1. Source File 2. COMPILER3. Object Code4. INTERPRETER/JVM5. Program
1. Source File 2. COMPILER3. Object Code4. INTERPRETER/JVM5. Program
Return
4th Grade Input Question4th Grade Input Question
What two lines of code are required for writing a java program with input?
What two lines of code are required for writing a java program with input?
4th Grade Input Answer4th Grade Input Answer
import java.util.Scanner;public class program {
public static void main(String[] args){Scanner kboard = new
Scanner(System.in);}
}
import java.util.Scanner;public class program {
public static void main(String[] args){Scanner kboard = new
Scanner(System.in);}
} Return
3rd Grade Output Question3rd Grade Output Question
What would be outputted by the following:int a = 1;
int b = 4;
System.out.println(“ans= “ + a + b);
What would be outputted by the following:int a = 1;
int b = 4;
System.out.println(“ans= “ + a + b);
3rd Grade Output Answer 3rd Grade Output Answer
It would output:ans = 14 It would output:ans = 14
Return
3rd Grade Errors Question3rd Grade Errors Question
Classify the following with the type of error:
1)Forgetting a semi-colon in a command
2)Outputting the addition of 1+3 as 3.3)Forgetting a brace bracket at the
end of the program
Classify the following with the type of error:
1)Forgetting a semi-colon in a command
2)Outputting the addition of 1+3 as 3.3)Forgetting a brace bracket at the
end of the program
3rd Grade Errors Answer3rd Grade Errors Answer
1) Syntax 2) Logic 3) Syntax
1) Syntax 2) Logic 3) Syntax
2nd Grade Variables Question
2nd Grade Variables Question
Write statement(s) that declares and assigns the following values: mark with a value of 85 words with a value of Computers temperature with a value of 15.3
Write statement(s) that declares and assigns the following values: mark with a value of 85 words with a value of Computers temperature with a value of 15.3
2nd Grade VariablesAnswer2nd Grade VariablesAnswer
int mark = 85; String words = “Computers”; double temperature = 15.5;
int mark = 85; String words = “Computers”; double temperature = 15.5;
Return
2nd Grade Binary Numbers Question
2nd Grade Binary Numbers Question
What are binary numbers, and why are they used?
What are binary numbers, and why are they used?
2nd Grade Binary Numbers Answer
2nd Grade Binary Numbers Answer
Computers are made up of wires and electronic circuits and control them, 1-on, and 0-off
Used to represent this on/off nature of the wire.
Computers are made up of wires and electronic circuits and control them, 1-on, and 0-off
Used to represent this on/off nature of the wire.
Return
1st Grade Hardware Question1st Grade Hardware Question
What is the difference between RAM and ROM?
What is the difference between RAM and ROM?
1st Grade Hardware Answer1st Grade Hardware Answer
RAM – random access memory (can read-write to this memory, computer memory)
ROM – read only memory (startup, only read to this memory)
RAM – random access memory (can read-write to this memory, computer memory)
ROM – read only memory (startup, only read to this memory)
Return
1st Grade Intro to Java Question1st Grade Intro to Java Question
What is Eclipse known as? What is Eclipse known as?
1st Grade Intro to Java Answer
1st Grade Intro to Java Answer
Eclipse is an IDE (integrated development environment)
Eclipse is an IDE (integrated development environment)
Return
Million Dollar QuestionGrade Level Topic 11
Million Dollar QuestionGrade Level Topic 11
Input and OutputInput and Output
1,000,000 Question1,000,000 Question Write a short program using Java that
will ask the user to input a name. The program should also ask the user
to enter an adjective. The program should output a
statement that resembles:________ (name) is very ____ (adjective).
Write a short program using Java that will ask the user to input a name.
The program should also ask the user to enter an adjective.
The program should output a statement that resembles:
________ (name) is very ____ (adjective).
1,000,000 Answer 1,000,000 Answer
We will discuss answers in class! We will discuss answers in class!
Return
Thanks for Playing!Thanks for Playing!