Exercises
Arrays are incredibly useful for storing and managing similar types of data, such as a list of dinosaur names, dinosaur weights, and visitors’ favorite snacks. Arrays are helpful and they enable us to manage more complex data in Mesozoic Eden. Try out the following:
- The unique appeal of our park lies in the diversity of our dinosaur species. (And also in that we have dinosaurs at all.) Create an array that holds the names of all the dinosaur species in the park. This list will help us in inventory management.
- Every visitor has their favorite dinosaur, and for many, it’s the heaviest one. Write a program that finds this star’s weight in an array of dinosaur weights. This information can then be highlighted in our park tours and educational programs.
- Dinosaurs come in all sizes, and the smallest ones hold a special place in the hearts of children. Write a program that finds this smallest dinosaur in an array of dinosaur weights.
- Running...