APCS UNIT 1

APCS UNIT 1

12th Grade

39 Qs

quiz-placeholder

Similar activities

AP CSAP Lists

AP CSAP Lists

9th - 12th Grade

34 Qs

Loops in Java

Loops in Java

10th - 12th Grade

41 Qs

Spring Final Review Part II

Spring Final Review Part II

9th - 12th Grade

35 Qs

T1 Diagnostic 01.09.2024

T1 Diagnostic 01.09.2024

12th Grade

40 Qs

Python L1 Concepts

Python L1 Concepts

1st - 12th Grade

40 Qs

AP Computer Science Review

AP Computer Science Review

9th - 12th Grade

40 Qs

AP CS A Midterm Review

AP CS A Midterm Review

9th - 12th Grade

37 Qs

APCSA Unit 6 Arrays

APCSA Unit 6 Arrays

9th - 12th Grade

34 Qs

APCS UNIT 1

APCS UNIT 1

Assessment

Quiz

Computers

12th Grade

Easy

Created by

Maura Duffy

Used 20+ times

FREE Resource

39 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Consider the following code segment.

What is printed as a result of executing the code segment?

Hello!!!

Hello System.out.println!!!

Hello

!!!

Hello System.out.println

!!!

Nothing is printed because the text "System.out.println" cannot appear inside a print statement.


2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Which of the following changes can be made so that the code segment produces the intended output?

Changing print to println in line 1 only

Changing print to println in line 2 only

Changing print to println in line 3 only

Changing print to println in lines 2 and 3 only

Changing print to println in lines 1, 2, 3, and 4

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Which line of code, if any, causes an error?

Line 1

Line 2

Line 3

Line 4

The segment works as intended

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is printed as a result of executing the code segment?

APCSA

APCS

A

AP

CSA

AP

CS

A

Media Image

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Which change, if any, can be made so that the code segment produces the intended output?

In line 1, print should be changed to println.


In lines 2 and 3, println should be changed to print.


The statement System.out.println() should be inserted between lines 2 and 3.


In lines 1, 2, and 3, the text that appears in parentheses should be enclosed in quotation marks.


No change is needed; the code segment works correctly as is.


6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is printed as a result of executing the code segment?

*

**

***

****

*

**

*******

*

*****

****

***

***

****

***

*******

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Which of the following variable declarations are most appropriate to replace

/* missing declarations */ in this code segment?

int pi = 3.14159;

int d = 1.5;

final int c;

final int pi = 3.14159;

int d = 1.5;

int c;

final double pi = 3.14159;

double d = 1.5;

double c;

double pi = 3.14159;

double d = 1.5;

final double c = 0.0;

final double pi = 3.14159;

final double d = 1.5;

final double c = 0.0;

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?