Skip to content

Course home

Robust and secure programming

Robust and secure programming

EasyMediumHard
123456789101112131415161718
Question 11

The program shown below contains errors.

1  scores = [85, 90, 78, 92]
2  total = 0
3  for i in range(len(scores))
4      total = total + scores[i]
5  average = total / 5
6  print("Average is: " + average)

Which statement is true about syntax errors?

A

A syntax error is caused by a violation of the programming language's rules or grammar.

B

A syntax error can easily be identified by dry-running the algorithm with a trace table.

C

A syntax error occurs when the program runs fully but produces an unexpected or incorrect output.

D

Dividing a number by zero during program execution is a typical example of a syntax error.

Markscheme

Robust and secure programming Questions

  1. GCSE
  2. /Computer Science
  3. /Robust and secure programming

27 exam-style questions on AQA GCSE Computer Science Robust and secure programming. Each one has a worked solution and a mark scheme showing where the marks go.

Question bank