
AP CSA Conditionals
Quiz
•
Computers
•
10th - 12th Grade
•
Hard
Garret Andreasen
Used 7+ times
FREE Resource
Enhance your content in a minute
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
5-1-1: What is the value of grade when the following code executes and score is 93?
if (score >= 90) grade = "A"; if (score >= 80) grade = "B"; if (score >= 70) grade = "C"; if (score >= 60) grade = "D"; else grade = "E";
A
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is equivalent to the code segment below?
if (x > 2) x = x * 2; if (x > 4) x = 0;
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the following code print when x has been set to -5? if (x < 0) System.out.println("x is negative"); else if (x == 0) System.out.println("x is zero"); else System.out.println("x is positive");
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the following code print when x has been set to 2000? if (x < 0) System.out.println("x is negative"); else if (x == 0) System.out.println("x is zero"); else System.out.println("x is positive");
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the following code print when x has been set to .8? if (x < .25) System.out.println("first quartile"); else if (x < .5) System.out.println("second quartile"); else if (x < .75) System.out.println("third quartile"); else System.out.println("fourth quartile");
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is printed when the following code executes and x has been set to zero? if (x > 0 && (y / x) == 3) System.out.println("first case"); else System.out.println("second case");
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is printed when the following code executes and x has been set to zero? if (x > 0 || (y / x) == 3) System.out.println("first case"); else System.out.println("second case");
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
15 questions
حاسب 2
Quiz
•
10th Grade
25 questions
Test Operatii Word+Formule Word
Quiz
•
1st - 10th Grade
15 questions
Ethical and Social Issues in ICT
Quiz
•
10th Grade
17 questions
ÔN TẬP CUỐI KỲ II TIN 8
Quiz
•
8th - 11th Grade
16 questions
Java by Mr Sam
Quiz
•
10th Grade
15 questions
Javascript Quiz 2
Quiz
•
11th Grade
20 questions
Computer parts
Quiz
•
1st - 12th Grade
20 questions
PENGENALAN MS.WORD
Quiz
•
10th Grade
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
