
Computer Scince Quizz - March 2025
Authored by Himara Senaratne
Computers
11th Grade
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
10 mins • 20 pts
A traffic light simulator uses pseudocode to determine actions based on color input. The rules are:
"Red" → "Stop", "Yellow" → "Caution", "Green" → "Go".
The function trafficLight() mistakenly returns "Go" for "Yellow" due to incorrect condition ordering.
How should the conditions be ordered to fix this?
Swap "Green" and "Red" checks
Place "Yellow" first
Replace ELSEIF with CASE
No changes needed
Answer explanation
The current order checks "Green" before "Yellow," causing incorrect returns. Reordering ensures correct priority.
Therefore teh answer is "Place "Yellow" first"
2.
MULTIPLE CHOICE QUESTION
10 mins • 20 pts
A developer is writing a function to check whether a given string consists only of numeric digits.
What method should they use to verify each character is a number?
Checking ASCII values
Using regular expressions
Checking character properties
Using a loop to compare each character manually
Answer explanation
ASCII values for digits range from 48 ('0') to 57 ('9'). By iterating through each character and ensuring its ASCII value falls within this range, we can validate that the string contains only numeric digits.
3.
MULTIPLE CHOICE QUESTION
10 mins • 20 pts
A company is developing a program to process a list of customer orders. The program needs to iterate over each order and apply a discount if the order total exceeds a certain amount.
Which loop structure is most suitable?
While loop
Do-while loop
For loop
Recursive function
Answer explanation
A for loop is best suited when iterating through a known number of elements, such as a list of customer orders. It ensures that each order is processed sequentially without unnecessary checks.
4.
MULTIPLE CHOICE QUESTION
10 mins • 20 pts
A software engineer is developing a program that performs calculations on large datasets. Instead of rewriting the same logic multiple times, they decide to use functions.
What is the main benefit of using reusable functions?
Reduced memory usage
Increased performance
Code maintainability and reusability
Faster execution speed
Answer explanation
Functions allow code to be reused multiple times without duplication. This improves maintainability, as any changes to logic need to be updated in only one place.
Therefore the answer is :
Code maintainability and reusability
5.
MULTIPLE CHOICE QUESTION
10 mins • 20 pts
A weather application determines if it should send a rain alert based on the current precipitation percentage.
Which conditional statement should be used?
If-else statement
Switch-case statement
For loop
While loop
Answer explanation
An if-else statement is ideal for decision-making based on conditions. It allows checking if precipitation is above a certain threshold to trigger an alert.
Therefore teh answer is:
If-else statement
6.
MULTIPLE CHOICE QUESTION
10 mins • 20 pts
A software developer needs to sort a list of product prices in ascending order.
Which sorting algorithm is used?
Quick Sort
Merge Sort
Bubble Sort
Insertion Sort
Answer explanation
Bubble Sort repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order. It is simple to implement but inefficient for large datasets.
7.
MULTIPLE CHOICE QUESTION
10 mins • 20 pts
A teacher wants to print every third number between 1 and 10. The pseudocode uses a FOR loop and MOD operation to identify these numbers.
Which numbers will be printed?
1, 2, 3
3, 6, 9
1, 4, 7
2, 4, 6
Answer explanation
The loop runs from 1 to 10. The MOD operation checks if each number divided by 3 leaves no remainder. Only numbers divisible by 3 (3, 6, 9) satisfy this condition. This demonstrates how MOD can select specific items in a sequence.
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
20 questions
Soal Pilihan Ganda Topologi Jaringan XI TKJ 2
Quiz
•
11th Grade
20 questions
KELAS DKV 1 PTS PLD SEMESTER 2
Quiz
•
11th Grade
22 questions
C# start
Quiz
•
11th - 12th Grade
20 questions
Quiz
•
7th - 12th Grade
25 questions
HTML
Quiz
•
11th Grade
20 questions
Nuevas tecnologías
Quiz
•
6th Grade - Professio...
20 questions
HISTORY OF COMPUTER_SUMMATIVE 1
Quiz
•
11th - 12th Grade
20 questions
SaaS
Quiz
•
11th 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
29 questions
Alg. 1 Section 5.1 Coordinate Plane
Quiz
•
9th Grade
22 questions
fractions
Quiz
•
3rd Grade
11 questions
FOREST Effective communication
Lesson
•
KG
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
22 questions
El Imperfecto
Quiz
•
9th - 12th Grade
15 questions
ACT Reading Practice
Quiz
•
11th Grade
20 questions
SSS/SAS
Quiz
•
9th - 12th Grade
20 questions
verbos reflexivos en español
Quiz
•
9th - 12th Grade
14 questions
Making Inferences From Samples
Quiz
•
7th - 12th Grade
23 questions
CCG - CH8 Polygon angles and area Review
Quiz
•
9th - 12th Grade
8 questions
Momentum and Collisions
Lesson
•
9th - 12th Grade