Python+Arrays

Arrays

 * An array is a store of data items in an organised structure.
 * The array index starts at 0, and ends 1 less than the number of elements in an array
 * In Python, an array is known as a list

Task 1
Write a program to store 6 colours in an array.
 * Specification**


 * Code**

Task 2
Write a program to store two arrays: one of pupil names, one of pupil scores. The program should then ask the user which pupil to display and display their name and score.
 * Specification**


 * Code**

Task 3
A program is required to draw two football teams at random. It should have two arrays: one for the home teams, and one for the away teams. It should then draw a random team from each array
 * Specification**


 * Code**

Questions
1. In task 2, what happens if the user enters 9? Why does this happen?

2. In task 2, why is **names[student_num - 1]** used and not **names[student_num]**

3. Write a program which stores two arrays: an array of countries, and an array of capital cities. The program should loop through and display each country and its capital city.  code names[student_num - 1 code