Talk:A-level Computing 2009/AQA/Problem Solving, Programming, Data Representation and Practical Exercise/Fundamentals of Programming/One-Dimensional Arrays


 * 1) make an array of 5 items of type string
 * 2) write code to insert your favourite things (e.g. item 1 = hens)
 * 3) (HINT: use a loop)
 * 4) create a loop to print out all the items in order
 * 5) create a loop to print out all the items in reverse order
 * 6) make a function [printarr(array)] to print out all elements in an array (BONUS MARK, add another parameter that allows them to specify reverse order printing)
 * 7) make a function to print out the elements that begin with a 'P' (BONUS MARK, add another parameter that allows them to specify what letter to filter on)
 * 8) make a function that allows the user to change the specified value in an array, for example:

Untitled
changeArray(array, 4, "cats") will put the word cats into the 4th element of an array
 * 1) Test that all of this works