Comp Sci Quiz #6
Quiz
•
Computers
•
11th Grade
•
Practice Problem
•
Easy
Nick Nessralla
Used 15+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Assume that the Boolean variable hot is assigned the value true and the Boolean variable humid is assigned the value false. Which of the following will display the value true ?
Select two answers.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Directions: The question or incomplete statement below is followed by four suggested answers or completions. Select the one that is best in each case.
The ticket prices at a movie theater are given below.
A programmer is creating an algorithm to set the value of ticketPrice based on the information in the table. The programmer uses the integer variable age for the age of the moviegoer. The Boolean variable is3D is true when the movie is 3-D and false otherwise.
Which of the following code segments correctly sets the value of ticketPrice?
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The cost of a customer’s electricity bill is based on the number of units of electricity the customer uses.
For the first 25 units of electricity, the cost is $5 per unit.
For units of electricity after the first 25, the cost is $7 per unit.
Which of the following code segments correctly sets the value of the variable cost to the cost, in dollars, of using numUnits units of electricity?
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following code segment.
What is the value of sum after the code segment is executed?
12
14
16
18
5.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
In a certain video game, players are awarded bonus points at the end of a level based on the value of the integer variable timer. The bonus points are awarded as follows.
If timer is less than 30, then 500 bonus points are awarded.
If timer is between 30 and 60 inclusive, then 1000 bonus points are awarded.
If timer is greater than 60, then 1500 bonus points are awarded.
Which of the following code segments assigns the correct number of bonus points to bonus for all possible values of timer ?
Select two answers.
6.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Assume that the Boolean variable x is assigned the value true and the Boolean variable y is assigned the value false. Which of the following will display the value true ?
Select two answers.
7.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
In a certain video game, the variable maxPS represents the maximum possible score a player can earn. The maximum possible score depends on the time it takes the player to complete the game. The value of maxPS should be 30 if time is greater than 120 and 50 otherwise.
Which of the following code segments correctly sets the value of maxPS based on the value of time ?
Select two answers.
Access all questions and much more by creating a free account
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
10 questions
KUIS Analisis Data
Quiz
•
11th Grade
8 questions
Overview of IT
Quiz
•
6th Grade - University
15 questions
4.6.4 Logic Gates
Quiz
•
10th Grade - Professi...
12 questions
Wee Word Intro
Quiz
•
7th - 12th Grade
15 questions
หน่วยที่ 1 ความรู้พื้นฐานการจัดการ ข้อมูลขนาดใหญ่ (Big Data)
Quiz
•
9th - 12th Grade
10 questions
USING HAND TOOLS
Quiz
•
11th Grade
13 questions
Five Nights At Freddy's: Security Breach Quiz
Quiz
•
KG - Professional Dev...
14 questions
Bài 29. Nhận biết lỗi chương trình
Quiz
•
9th - 12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
