Photo AI

For each of the pseudocode algorithms shown below, tick the appropriate box to show whether they will loop infinitely or not - OCR - GCSE Computer Science - Question 6 - 2018 - Paper 1

Question icon

Question 6

For-each-of-the-pseudocode-algorithms-shown-below,-tick-the-appropriate-box-to-show-whether-they-will-loop-infinitely-or-not-OCR-GCSE Computer Science-Question 6-2018-Paper 1.png

For each of the pseudocode algorithms shown below, tick the appropriate box to show whether they will loop infinitely or not. 1. x = 0 while True prin... show full transcript

Worked Solution & Example Answer:For each of the pseudocode algorithms shown below, tick the appropriate box to show whether they will loop infinitely or not - OCR - GCSE Computer Science - Question 6 - 2018 - Paper 1

Step 1

1. Will loop infinitely

96%

114 rated

Answer

Tick the box for 'Will loop infinitely'. The condition 'while True' means this loop will never terminate.

Step 2

2. Will not loop infinitely

99%

104 rated

Answer

Tick the box for 'Will not loop infinitely'. The loop will execute until x becomes 10.

Step 3

3. Will not loop infinitely

96%

101 rated

Answer

Tick the box for 'Will not loop infinitely'. This loop increments x each time and will terminate once x is no longer less than 10.

Step 4

4. Will not loop infinitely

98%

120 rated

Answer

Tick the box for 'Will not loop infinitely'. The for loop will execute exactly 5 times for values 1 to 5.

Step 5

Using pseudocode write an algorithm that will use a count-controlled loop to print out the numbers 1 to 10 in ascending order.

97%

117 rated

Answer

for i = 1 to 10
    print i
next

Join the GCSE students using SimpleStudy...

97% of Students

Report Improved Results

98% of Students

Recommend to friends

100,000+

Students Supported

1 Million+

Questions answered

Other GCSE Computer Science topics to explore

;