Skip to content

Course home

Programming concepts

Programming concepts

EasyMediumHard
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
Question 102

An industrial pressure monitoring system uses the algorithm shown in the pseudocode below to regulate a safety release valve:

1      vessel_pressure ← USERINPUT
2      IF vessel_pressure < 100 THEN
3          cycles ← 10
4      ELSE IF vessel_pressure >= 100 AND vessel_pressure <= 250 THEN
5          cycles ← 15
6      ELSE
7          cycles ← 20
8      ENDIF
9      FOR count ← 1 TO cycles
10         IF count MOD 4 = 0 THEN
11             RELEASE_VALVE()
12         ELSE IF count MOD 6 = 0 THEN
13             RELEASE_VALVE()
14         ENDIF
15     ENDFOR

Select the option that shows the exact number of times the subroutine RELEASE_VALVE would be called if the user input is 150.

A

333

B

444

C

555

D

666

Markscheme

Programming concepts Questions

  1. GCSE
  2. /Computer Science
  3. /Programming concepts

298 exam-style questions on AQA GCSE Computer Science Programming concepts. Each one has a worked solution and a mark scheme showing where the marks go.

Question bank