Photo AI

The algorithm in Figure 2 has been developed to automate the quantity of dog biscuits to put in a dog bowl at certain times of the day - AQA - GCSE Computer Science - Question 3 - 2021 - Paper 1

Question icon

Question 3

The-algorithm-in-Figure-2-has-been-developed-to-automate-the-quantity-of-dog-biscuits-to-put-in-a-dog-bowl-at-certain-times-of-the-day-AQA-GCSE Computer Science-Question 3-2021-Paper 1.png

The algorithm in Figure 2 has been developed to automate the quantity of dog biscuits to put in a dog bowl at certain times of the day. - Line numbers are included ... show full transcript

Worked Solution & Example Answer:The algorithm in Figure 2 has been developed to automate the quantity of dog biscuits to put in a dog bowl at certain times of the day - AQA - GCSE Computer Science - Question 3 - 2021 - Paper 1

Step 1

Shade one lozenge which shows the line number where selection is first used in the algorithm shown in Figure 2.

96%

114 rated

Answer

The correct line number where selection is first used is Line number 2. This line implements the first IF statement to check the time.

Step 2

Shade one lozenge which shows the line number where iteration is first used in the algorithm shown in Figure 2.

99%

104 rated

Answer

The correct line number where iteration is first used is Line number 11. This line introduces a FOR loop that iterates through a specified range.

Step 3

State how many times the subroutine DISPENSE_BISCUIT will be called with the parameter 'chewies' if the user input is 'lunch'.

96%

101 rated

Answer

The subroutine DISPENSE_BISCUIT will be called twice with the parameter 'chewies' if the user input is 'lunch', since the FOR loop with n < 3 will be executed twice.

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

;