Skip to content

Course home

Constructs

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]
Markscheme

Constructs Questions

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

18 exam-style questions on Edexcel IGCSE Computer Science Constructs. Each one has a worked solution and a mark scheme showing where the marks go.

Question bank