Iterating over arrays
📖 Scenario: You are helping a small shop owner who wants to check the prices of some fruits they have in stock.
🎯 Goal: You will create a program that stores fruit prices in an array, then uses a loop to print each fruit's price.
📋 What You'll Learn
Create an array with exact fruit prices
Create a variable to count the number of fruits
Use a for loop with index to iterate over the array
Print each fruit price with a message
💡 Why This Matters
🌍 Real World
Arrays and loops are used in many programs to store and process lists of data, like prices, names, or measurements.
💼 Career
Understanding how to iterate over arrays is a fundamental skill for software developers working with data collections.
Progress0 / 4 steps