
6.06 Part 1 Challenge Exam
Quiz
•
Computers
•
9th - 12th Grade
•
Practice Problem
•
Hard
Michael Courtright
Used 58+ times
FREE Resource
Enhance your content in a minute
27 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
If String str1 = "Forest" and String str2 = "School"
what is the value of str1.compareTo(str2);?
1
-1
0
a value less than 0
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Assume that age has been declared as an int variable. Which expression is true whenever age indicates that the person is a teenager?
((age < 20) && (age >= 13))
((age < 20) || (age >= 13))
((age <= 19) && (age < 13)
((age <= 19) || (age >= 13))
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
!((x > y) || (y <= 0)) is equivalent to which of the following expressions in the image?
I
II
III
I and III only
II and III only
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Assume that these String variables have been declared:
String str1 = "fred";
String str2 = "Fred";
What is the value of the following expression?
str1.equals(str2);
true
false
fred
equal
5.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
When is the following expression true?
!(!a || b) || (!a && b)
If and only if a and b have different values
If and only if a and b have the same value
If and only if both a and b are true
If and only if both a and b are false
6.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
What is output by the following segment of code in the image?
int i = 6;
while (i >= 2)
{
System.out.print (i + " ");
if ((i % 2) == 0)
{
i = i / 2;
} else
{
i++;
}
}
6 7 4 2
6 3 4 2
6 2 4 1
6 5 4 3 2
6 3 5 2
7.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Given the following code:
if (n == 2)
{
k -= 2;
}
else if (n == 3)
{
k -= 3;
}
can be rewritten as
if (< condition >)
{
< assignment statement >;
}
where < condition > and < assignment statement > are chosen so that the rewritten code
performs the same task as the original code. Assume that both n and k are integer
variables.
Which of the following could be used as < condition >?
I. (n == 2) || (n == 3)
II. (n == 2) && (n == 3)
III. (n >= 2) && (n <= 3)
I
II
III
I & III only
II and III only
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
23 questions
Intro to Computers
Quiz
•
8th - 10th Grade
23 questions
Y5-Criterion A: Inquiring and Analyzing
Quiz
•
8th - 10th Grade
22 questions
1.3.2 Network Topologies and Layers
Quiz
•
10th - 11th Grade
23 questions
Cybersecurity Checkpoint 1
Quiz
•
10th - 12th Grade
22 questions
ΘΕΜΑΤΑ ΔΟΜΗΣ ΕΠΙΛΟΓΗΣ
Quiz
•
12th Grade
22 questions
Web Design and Development Revision
Quiz
•
10th Grade
22 questions
Project Methodology Quiz
Quiz
•
12th Grade
24 questions
Nesne Tabanlı Programlama/Class
Quiz
•
10th Grade
Popular Resources on Wayground
10 questions
Forest Self-Management
Lesson
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
30 questions
Thanksgiving Trivia
Quiz
•
9th - 12th Grade
30 questions
Thanksgiving Trivia
Quiz
•
6th Grade
11 questions
Would You Rather - Thanksgiving
Lesson
•
KG - 12th Grade
48 questions
The Eagle Way
Quiz
•
6th Grade
10 questions
Identifying equations
Quiz
•
KG - University
10 questions
Thanksgiving
Lesson
•
5th - 7th Grade
Discover more resources for Computers
30 questions
Thanksgiving Trivia
Quiz
•
9th - 12th Grade
11 questions
Would You Rather - Thanksgiving
Lesson
•
KG - 12th Grade
10 questions
Identifying equations
Quiz
•
KG - University
18 questions
Thanksgiving Trivia
Quiz
•
4th - 12th Grade
20 questions
Thanksgiving
Quiz
•
KG - 12th Grade
20 questions
Pythagorean Theorem and Their Converse
Quiz
•
8th - 9th Grade
10 questions
Understanding Meiosis
Interactive video
•
6th - 10th Grade
10 questions
Thanksgiving Trivia Challenge: Test Your Knowledge!
Interactive video
•
6th - 10th Grade
