Programming is writing instructions that a computer can carry out. This topic covers the building blocks found in every language. Variables and constants store data of a type such as integer, real, string or Boolean. Sequence, selection and iteration control the order of steps: IF statements choose, and FOR, WHILE and REPEAT loops repeat. Arrays hold lists of values, and procedures and functions break a long program into parts. Programs also validate input, handle strings and read and write files. You practise these in pseudocode and in Python.
Scores starts at index 1. The same data is a list scores in Python. Which Python index holds the value of Scores[1]?scores[0].
scores[1] is the second element. scores[2] is the third. scores[-1] is the last.Log in to join the discussion.
Loading…