
CSA Unit4 Lucky Test

Quiz
•
Computers
•
10th Grade
•
Medium

Shanshan 黄珊珊 Huang
Used 9+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following best describes the error in the program?
The variable prod is incorrectly initialized.
The while condition always evaluates to false.
The while condition always evaluates to true.
The negative number entered to signal no more input is included in the product.
If the user enters a zero, the computation of the product will be terminated prematurely.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
1
3
5
7
8
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is printed as a result of executing this code segment?
1
2
3
5
6
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following best explains how the output changes from code segment I to code segment II?
Both code segments produce the same output, because they both iterate four times.
Both code segments produce the same output, because they both iterate five times.
Code segment I prints more values than code segment II does, because it iterates for one additional value of k.
Code segment II prints more values than code segment I, because it iterates for one additional value of k.
The code segments print the same values but in a different order, because code segment I iterates from 1 to 5 and code segment II iterates from 5 to 1.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following best describes the value returned from a call to doWhat ?
num
The sum of all integers between 1 and num, inclusive
The sum of all even integers between 1 and num, inclusive
The sum of all odd integers between 1 and num, inclusive
No value is returned because of an infinite loop.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following method. What value is returned as a result of the call getTheResult(8) ?
48
105
384
5040
40320
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The number of times the string check occurs in str
The index of the first occurrence of check inside str
The index of the last occurrence of check inside str
The number of substrings in str with the same length as check
The number of substrings in str that do not match check
Create a free account and access millions of resources
Similar Resources on Wayground
14 questions
C ++ For Loop

Quiz
•
9th - 12th Grade
10 questions
AP CS A Unit 7 Quiz PRACTICE

Quiz
•
9th - 12th Grade
10 questions
Python Variables

Quiz
•
7th - 12th Grade
12 questions
Java Strings

Quiz
•
9th - 12th Grade
12 questions
Functions With Return Values U1M2 Python

Quiz
•
9th - 12th Grade
10 questions
AP CS A Unit 6 Quiz PRACTICE

Quiz
•
9th - 12th Grade
15 questions
if-else-if and Logical Operators

Quiz
•
9th - 12th Grade
17 questions
Cumulative Test Practice Units 1, 3, 4, 5, & 7

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

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
10 questions
Proper Keyboarding Techniques

Interactive video
•
6th - 10th Grade
10 questions
Understanding Computers: Hardware, Software, and Operating Systems

Interactive video
•
7th - 12th Grade
29 questions
AP CSP Unit 2 Review (Code.org)

Quiz
•
10th - 12th Grade