Array Introduction
In the previous lesson, we learned about conditionals, which allow us to determine which parts of the code should be executed based on a condition. In this lesson, we will look at another important concept in programming - arrays.
Arrays allow us to store multiple values in a single variable. We can think of an array as a list that contains different items.
For example, if we have a list of students in a class, we don't need to store each student's name in a new variable but can store their names in a single array.
students = ["Jennifer", "Boris", "Nancy", "David", "Ava"]
Arrays are very useful when we need to work with a large amount of data.
Now that we know what an array is, we can move on to more exercises where we will try working with arrays!
Instructions
Press run and see how the array is printed.
Start programming for free
1/10