Skip to content

Course home

Sign up

Computational thinking

EasyMediumHard
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
Question 62

The Nebula-9 Deep Space Observatory uses an automated algorithm to categorize incoming radio transmission signals based on the first character of their signature code.

This is pseudo-code for the classification algorithm:

1 IF (sig[0] >= "D" AND sig[0] <= "K") THEN
2     SEND "Stellar Flare" TO DISPLAY
3 ELSE
4     IF (sig[0] >= "L" AND sig[0] <= "S") THEN
5         SEND "Nebular Echo" TO DISPLAY
6     ELSE
7         IF (sig[0] >= "T" AND sig[0] <= "Y") THEN
8             SEND "Pulsar Beam" TO DISPLAY
9         ELSE
10            SEND "Background Noise" TO DISPLAY
11        END IF
12    END IF
13 END IF

Complete the table below to show the output of the algorithm for the given input signals.

Signal CodeOutput displayed
PX-901
WG-405
2B-914
[3]
Markscheme

Computational thinking Questions

  1. GCSE
  2. /Computer Science
  3. /Computational thinking

Question bank