grade 11 cs review (unit 1)

26
Are You Smarter Than a 5 th Grader?

Upload: kcardinale113

Post on 14-Jun-2015

93 views

Category:

Education


1 download

TRANSCRIPT

Page 1: Grade 11 CS Review (unit 1)

Are You Smarter Than a 5th Grader?Are You Smarter

Than a 5th Grader?

Page 2: Grade 11 CS Review (unit 1)

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

Page 3: Grade 11 CS Review (unit 1)

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

Page 4: Grade 11 CS Review (unit 1)

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

Page 5: Grade 11 CS Review (unit 1)

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.

Page 6: Grade 11 CS Review (unit 1)

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

Page 7: Grade 11 CS Review (unit 1)

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

Page 8: Grade 11 CS Review (unit 1)

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

Page 9: Grade 11 CS Review (unit 1)

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?

Page 10: Grade 11 CS Review (unit 1)

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

Page 11: Grade 11 CS Review (unit 1)

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);

Page 12: Grade 11 CS Review (unit 1)

3rd Grade Output Answer 3rd Grade Output Answer

It would output:ans = 14 It would output:ans = 14

Return

Page 13: Grade 11 CS Review (unit 1)

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

Page 14: Grade 11 CS Review (unit 1)

3rd Grade Errors Answer3rd Grade Errors Answer

1) Syntax 2) Logic 3) Syntax

1) Syntax 2) Logic 3) Syntax

Page 15: Grade 11 CS Review (unit 1)

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

Page 16: Grade 11 CS Review (unit 1)

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

Page 17: Grade 11 CS Review (unit 1)

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?

Page 18: Grade 11 CS Review (unit 1)

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

Page 19: Grade 11 CS Review (unit 1)

1st Grade Hardware Question1st Grade Hardware Question

What is the difference between RAM and ROM?

What is the difference between RAM and ROM?

Page 20: Grade 11 CS Review (unit 1)

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

Page 21: Grade 11 CS Review (unit 1)

1st Grade Intro to Java Question1st Grade Intro to Java Question

What is Eclipse known as? What is Eclipse known as?

Page 22: Grade 11 CS Review (unit 1)

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

Page 23: Grade 11 CS Review (unit 1)

Million Dollar QuestionGrade Level Topic 11

Million Dollar QuestionGrade Level Topic 11

Input and OutputInput and Output

Page 24: Grade 11 CS Review (unit 1)

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).

Page 25: Grade 11 CS Review (unit 1)

1,000,000 Answer 1,000,000 Answer

We will discuss answers in class! We will discuss answers in class!

Return

Page 26: Grade 11 CS Review (unit 1)

Thanks for Playing!Thanks for Playing!