Warm Up FRF

Quiz
•
Computers
•
12th Grade
•
Hard

Margaret DeRidder
Used 10+ times
FREE Resource
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.
Similar Resources on Wayground
10 questions
Unit 1 Post Test: Basic Python

Quiz
•
9th - 12th Grade
10 questions
Python Review 2023-01-12

Quiz
•
9th - 12th Grade
9 questions
AP CS A Quiz 4 Practice

Quiz
•
9th - 12th Grade
8 questions
Java Conditionals Unit 3

Quiz
•
9th - 12th Grade
10 questions
APCSA Unit 1 Review 1

Quiz
•
10th - 12th Grade
10 questions
Exploring Python: Input and Output Essentials

Quiz
•
9th Grade - University
10 questions
AP CSA - Inheritance, plus one while loop.

Quiz
•
12th Grade
10 questions
Python - Lists and Elements

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade