Skip to content
MathsGenie logo
Quick links
Open app

Course home

  1. IGCSE
  2. Computer Science Edexcel
  3. Question bank

Develop code

EasyMediumHard
123456789101112131415161718192021222324252627
Question 3

Write a program in your chosen programming language to implement the logic shown in the following pseudocode.

Pseudocode Logic

1  # Print prompt and take workshop name from user
2  SEND "Enter the workshop you are booking for: " TO DISPLAY
3  RECEIVE workshop FROM (STRING) KEYBOARD
4
5  # Tell the user their workshop choice
6  SEND ("Workshop selected: " & workshop) TO DISPLAY
7
8  # Take number of club members in group
9  SEND "Enter the number of club members: " TO DISPLAY
10 RECEIVE members FROM (INTEGER) KEYBOARD
11
12 # Take number of non-members in group
13 SEND "Enter the number of non-members: " TO DISPLAY
14 RECEIVE nonMembers FROM (INTEGER) KEYBOARD
15
16 # Calculate total number in group
17 SET totalAttendees TO members + nonMembers
18
19 # Tell user the total number of attendees
20 SEND ("The total number of attendees is: " & totalAttendees) TO DISPLAY

Do not add any further functionality beyond the logic described in the pseudocode.

[10]

Develop code Questions

  1. IGCSE
  2. /Computer Science
  3. /Develop code