Comp Sci Unit 2 #9

Quiz
•
Computers
•
11th Grade
•
Easy
Nick Nessralla
Used 14+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
The following spinner is used in a game. The region labeled "blue" represents 1/4 of the spinner. The regions labeled "orange" and "purple" are equal in size.
Which of the following code segments can be used to simulate the behavior of the spinner?
Select two answers.
2.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
In a certain game, the integer variable bonus is assigned a value based on the value of the integer variable score.
If score is greater than 100, bonus is assigned a value that is 10 times score.
If score is between 50 and 100 inclusive, bonus is assigned the value of score.
If score is less than 50, bonus is assigned a value of 0.
Which of the following code segments assigns bonus correctly for all possible integer values of score ?
Select two answers.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Ticket prices for a science museum are shown in the following table.
A programmer is creating an algorithm to display the cost of a ticket based on the information in the table. The programmer uses the integer variable age for the age of the ticket recipient. The Boolean variable includesTour is true when the ticket is for a guided tour and is false when the ticket is for general admission.
Which of the following code segments correctly displays the cost of a ticket?
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the code segment below.
If the variables onTime and absent both have the value false, what is displayed as a result of running the code segment?
Is anyone there?
Better late than never.
Hello. Is anyone there?
Hello. Better late than never.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following code segment with integer variables x and y.
If x has a value of 7 and y has a value of 20, what is displayed as a result of executing the code segment?
ONE
TWO
THREE
FOUR
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In the program below, the initial value of x is 5 and the initial value of y is 10.
What is displayed as a result of running the program?
Foxtrot
Hotel
November
Yankee
7.
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.
A student wrote the procedure below, which is intended to ask whether a user wants to keep playing a game. The procedure does not work as intended.
Which of the following best describes the result of running the procedure?
The procedure returns true when the user inputs the value "y" and returns false otherwise.
The procedure returns true when the user inputs the value "n" and returns false otherwise.
The procedure returns true no matter what the input value is.
The procedure returns false no matter what the input value is.
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
N4 SDD - Code understanding quiz 1

Quiz
•
10th - 12th Grade
10 questions
Code Evaluation

Quiz
•
9th - 11th Grade
10 questions
Comp Sci unit 3 #6

Quiz
•
11th Grade
10 questions
Comp Sci Quiz #6

Quiz
•
11th Grade
15 questions
KS4 - Python Turtle

Quiz
•
9th - 11th Grade
10 questions
Y6 - Programming A - Variables in games

Quiz
•
6th Grade - University
13 questions
Thunkable Intro!

Quiz
•
9th - 12th Grade
12 questions
Variables in coding pt. 1

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade