Search Header Logo

Warm Up FRF

Authored by Margaret DeRidder

Computers

12th Grade

Used 10+ times

Warm Up FRF
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Consider the following code segment.

System.out.println("W");

System.out.println("X");

System.out.print("Y");

System.out.print("Z");

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

WXYZ

W

XYZ

WX

YZ

W

X

YZ

W

X

Y

Z

2.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Consider the following code segment.

System.out.print("cat ");

System.out.println("dog ");

System.out.println("horse ");

System.out.print("cow ");

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

cat dog horse cow

cat dog

horse

cow

cat dog

horse cow

cat

dog

horse cow

cat

dog

horse

cow

3.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Consider the following code segment.

System.out.print("Hello!");

System.out.println("How ");

System.out.print("are ");

System.out.print("you?");

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

Hello!Howareyou?

Hello!How are you?

Hello!

How are you?

Hello!How

are you?

Hello!

How

are

you?

4.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Consider the following code segment.

System.out.println(hello); // Line 1

System.out.print(world); // Line 2

The code segment is intended to produce the following output but does not work as intended.

hello

world

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

Inserting System.out.print(); between lines 1 and 2

Inserting System.out.println(); between lines 1 and 2

Changing println in line 1 to print

Changing print in line 2 to println

Enclosing hello in line 1 and world in line 2 in quotation marks

5.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Consider the following code segment.

System.out.print("Ready"); // Line 1

System.out.print("Set"); // Line 2

System.out.print("Go!"); // Line 3

The code segment is intended to produce the following output but may not work as intended.

Ready

Set

Go!

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

Changing print to println in lines 1 and 2

Changing print to println in line 3

Interchanging lines 1 and 3

Replacing all three lines with the single statement System.out.println("Ready Set Go!");

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

Access all questions and much more by creating a free account

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?