Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
27 views3 pages

Example Questions in Scenario Based Questions

The document provides a line-by-line analysis of pseudocode, identifying errors and suggesting corrections for proper IGCSE format. Key corrections include using '←' for assignment, capitalizing 'TO' and 'NEXT', using double quotes for strings, and ensuring consistent variable casing. The final corrected pseudocode is presented with all necessary adjustments.

Uploaded by

st-sdube
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views3 pages

Example Questions in Scenario Based Questions

The document provides a line-by-line analysis of pseudocode, identifying errors and suggesting corrections for proper IGCSE format. Key corrections include using '←' for assignment, capitalizing 'TO' and 'NEXT', using double quotes for strings, and ensuring consistent variable casing. The final corrected pseudocode is presented with all necessary adjustments.

Uploaded by

st-sdube
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Thanks for the clarification!

Given that **each space represents a new line**, let's reformat and
correct your original pseudocode line by line and identify the errors accordingly.

---

### ❌ **Your Pseudocode (line by line):**

```

Sum = 0

FOR count = 1 to 20

INPUT 'Enter number ', Number

SUM = Sum + Number

count = count + 1

PRINT sum

Next

```

---

### 🔍 **Line-by-Line Error Analysis:**

1. ✅ `Sum = 0`

* This is okay but should ideally use `←` instead of `=` for assignment in IGCSE pseudocode:

**Fix:** `Sum ← 0`

2. ⚠️`FOR count = 1 to 20`

* Should be: `FOR count ← 1 TO 20`

* Use `←` for assignment and capitalise `TO` properly.


3. ⚠️`INPUT 'Enter number ', Number`

* Use double quotes for strings.

* IGCSE format is: `INPUT "Enter number", Number`

4. ✅ `SUM = Sum + Number`

* This is logically correct, but:

* Use consistent variable casing (`Sum` or `sum`, not both).

* Prefer `←` over `=`: `Sum ← Sum + Number`

5. ❌ `count = count + 1`

* **WRONG in a FOR loop** — `count` is automatically incremented.

**Fix:** Remove this line.

6. ⚠️`PRINT sum`

* This prints after every loop iteration, which may not be your intention.

**Fix:** Move it **after the `NEXT`** line so it prints **only once**.

7. ⚠️`Next`

* `NEXT` should be in all caps to follow IGCSE format.

---

### ✅ **Corrected Version (Each Line Represents a New Line)**

```
Sum ← 0

FOR count ← 1 TO 20

INPUT "Enter number", Number

Sum ← Sum + Number

NEXT

PRINT Sum

```

---

Let me know if you'd like to convert this into a flowchart or include error-handling as well.

You might also like