Computer Scince Quizz - March 2025

Computer Scince Quizz - March 2025

11th Grade

25 Qs

quiz-placeholder

Similar activities

1.6 Privacy & Surveillance & Computing Laws

1.6 Privacy & Surveillance & Computing Laws

8th - 11th Grade

25 Qs

HTML Test

HTML Test

9th - 12th Grade

20 Qs

Python -Iteration (loops)

Python -Iteration (loops)

7th - 12th Grade

20 Qs

Code.org CSD Unit 3 Lessons 1-12

Code.org CSD Unit 3 Lessons 1-12

3rd - 12th Grade

20 Qs

Iteration

Iteration

11th Grade

20 Qs

U1 & U5 - Digital Info & Lists, Loops, Traversals -Vocab

U1 & U5 - Digital Info & Lists, Loops, Traversals -Vocab

9th - 12th Grade

22 Qs

UK Computer Laws

UK Computer Laws

10th - 12th Grade

20 Qs

WJEC ICT - Chapter 3 - Legal Issues

WJEC ICT - Chapter 3 - Legal Issues

10th Grade - University

23 Qs

Computer Scince Quizz - March 2025

Computer Scince Quizz - March 2025

Assessment

Quiz

Computers

11th Grade

Medium

Created by

Himara Senaratne

Used 1+ times

FREE Resource

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

10 mins • 20 pts

Media Image

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.

  1. 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

Media Image

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

Media Image

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

Media Image

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

Media Image

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

Media Image

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

Media Image

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.

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?