Skip to content
MathsGenie logo
Open app

Course home

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

Constructs

EasyMedium
1234567891011121314
Question 7

Consider the following algorithm that processes user input:

1 OUTPUT "Do you agree? (Yes/No): "
2 INPUT response
3 IF ((response == "Yes") OR (response == "No")) THEN
4     IF (response == "Yes") THEN
5         OUTPUT "Agreed"
6     ELSE
7         IF (response == "No") THEN
8             OUTPUT "Disagreed"
9         END IF
10    END IF
11 ELSE
12     OUTPUT "Invalid response"
13 END IF

Give one reason why the selection statement on line 7 is not required.

[1]

Constructs Questions

  1. IGCSE
  2. /Computer Science
  3. /Constructs