
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
12 questions
Hour of Code

Quiz
•
6th - 12th Grade
12 questions
Code Tracing Quiz

Quiz
•
9th - 12th Grade
20 questions
Unit 6. Mathematical Library Methods

Quiz
•
9th - 10th Grade
20 questions
Arrays in Java

Quiz
•
9th - 12th Grade
17 questions
Programming Languages

Quiz
•
9th - 12th Grade
19 questions
AP Computer Science A Unit 1

Quiz
•
9th - 12th Grade
15 questions
KS4 - Python Turtle

Quiz
•
9th - 11th Grade
20 questions
OCR GCSE CS MCQs 2.3 Defensive Design

Quiz
•
10th - 11th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

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

Interactive video
•
6th - 10th Grade
10 questions
1.2 OSI & TCP IP Models Quiz

Quiz
•
10th Grade
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
20 questions
Hardware vs. Software Quiz

Quiz
•
7th - 10th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade