Introduction:
In this activity, we’ll take a trip through our solar system using a 1D list (also called a one-dimensional array)! 🌞
A 1D list is a simple way to store multiple pieces of related information in one place — just like how the solar system contains several planets orbiting the same star.
We’ll create a list of the eight planets and then use basic list operations to explore interesting facts about them — such as finding the first planet from the Sun, printing all the planet names, and even adding or removing planets.
Learning Goals:
Understand what a 1D list is.
Learn how to create, access, and display list elements.
Apply basic list operations while exploring facts about the planets.