Explain the purpose of lines 5 to 8 in this pseudocode. (2)
Category Archives: Pseudocode
2015 – Q3
The pseudocode shown below uses a simple condition.
IF age < 5 THEN SEND nursery TO DISPLAY
Create a complex condition that will display “school” if a person is between the ages of 5 and 18 inclusive. (2)
2014 – Q18 (d)
An athlete is developing a mobile application (app).
The athletes will allow athletes to track weight in Kg.
Part of the pseudocode for the app is shown below.
State another design notation that could have been used to design the app. (1)
2014 – Q18 (c)
The pseudocode is edited to ensure that the new weight being entered is acceptable.
(i) State the type of loop shown above. (1)
(ii) State an input the user could enter to enable the program to continue from line 18. (1)
2014 – Q18 (a)
An athlete is developing a mobile application (app).
The athletes will allow athletes to track weight in Kg.
Part of the pseudocode for the app is shown below.
(i) Identify the line that contains a condition. (1)
(ii) Identify the line that stores a value in an array. (1)
(iii) Identify the line that accepts input values into the program. (1)
2014 – Q16 (b)
Jack has been asked to write a program to calculate the potential profit in a soft drinks business. The program will store the costs involved in producing and selling one litre of each drink.
The following calculations will be used to output the profit made for each litre of drink.
Manufacturing Cost = Water Cost + Flavouring Cost + Labour Cost
Profit = Selling Cost – Manufacturing Cost
Using pseudocode or a programming language of your choice, write a program to enter the required data, then calculate and display the profit for the soft drink business. (5)
2014 – Q14
Employees can only access their company network if they enter a correct username and password. A validation program is being developed and will run each time an employee logs on.
An extract of pseudocode from the program is shown below.
An error is noticed when the program is tested.
(a) Identify the line containing a logic error. (1)
(b) State how this error should be corrected. (1)
2014 – Q12
This pseudocode allows a user to enter the level they wish to start playing a game.
Explain what happens if a user enters 12. (2)