AP computer science unit 2

AP computer science unit 2

9th - 12th Grade

13 Qs

quiz-placeholder

Similar activities

Unit 2- Periodicity Exam Review

Unit 2- Periodicity Exam Review

10th Grade

14 Qs

Access - Lesson 14

Access - Lesson 14

9th - 12th Grade

10 Qs

Accounting Concepts and conventions

Accounting Concepts and conventions

10th Grade

11 Qs

ICT 10 : Introduction to Adobe Illustrator(CS5)

ICT 10 : Introduction to Adobe Illustrator(CS5)

10th Grade

10 Qs

Creative Technology - SUMMATIVE NO. 1

Creative Technology - SUMMATIVE NO. 1

10th Grade

10 Qs

VBA Knowledge Test

VBA Knowledge Test

1st - 10th Grade

15 Qs

Anime 99

Anime 99

9th Grade - Professional Development

13 Qs

past, present, future continouse tense

past, present, future continouse tense

9th Grade

15 Qs

AP computer science unit 2

AP computer science unit 2

Assessment

Quiz

9th - 12th Grade

Practice Problem

Medium

Created by

Sherry Dieterich

Used 807+ times

FREE Resource

About this resource

This quiz covers fundamental programming concepts in Java, specifically focusing on AP Computer Science A Unit 2 material at the high school level (grades 9-12). The questions assess students' understanding of the Math class methods including Math.random() and Math.abs(), string concatenation and manipulation, method parameters and scope, method overloading principles, and code tracing through various programming constructs. Students need to demonstrate proficiency in predicting program output, understanding data type conversions and casting, recognizing valid method calls based on parameter types, and applying knowledge of variable scope rules. The core reasoning skills required include logical thinking about mathematical operations, understanding how Java handles string and numeric data types, and the ability to mentally execute code step-by-step to determine correct outputs. Created by Sherry Dieterich, a computer science teacher in the US who teaches grades 9-12. This assessment serves as an excellent formative evaluation tool for students progressing through their first programming course, allowing both teacher and students to identify areas where foundational concepts need reinforcement. The quiz works effectively as a warm-up activity to activate prior knowledge before introducing new programming concepts, as homework to reinforce classroom learning, or as review material before unit exams. Teachers can use individual question performance to guide targeted instruction on specific programming concepts that students find challenging. This quiz aligns with College Board AP Computer Science A standards, particularly those addressing primitive data types, arithmetic expressions, method design and implementation, and program analysis skills that form the foundation for more advanced programming concepts.

See more

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

13 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

Which line of code would set x = to a number between 50 and 100?

int x = (int) (Math.random()*50)+50;

int x = (int) (Math.random()*50)-50;

int x = (int) (Math.random()*50)+51;

int x = (int) (Math.random()*50)+49;

2.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

Media Image

What is printed when the code is run?

Frankvelt

ranklivelt

Franko

lino

3.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

Media Image

What will print when this code is run?

7

9.0

5.66

5.0

4.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

What will s equal? int s = Math.abs(13-21);

8

-8

8.0

-8.0

5.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

Media Image

Which would be a valid call to this code?

PT(21.0, 8);

PT(7,"4");

PT(2,4);

PT(1.0,1.0);

6.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

Media Image

What will l = after the code is run?

5

6

7

8

7.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

What will p = after the code is run? String p = "cat " + 9;

cat

Nothing will print

The code will not compile

cat 9

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?