Array creation and usage
📖 Scenario: You are helping a small shop owner keep track of the prices of some fruits they sell. You will create an array to store the prices, then work with it to find useful information.
🎯 Goal: Build a Kotlin program that creates an array of fruit prices, sets a price threshold, finds which fruits are more expensive than that threshold, and prints those prices.
📋 What You'll Learn
Create an array with exact fruit prices
Create a price threshold variable
Use a loop or array function to find prices above the threshold
Print the filtered prices
💡 Why This Matters
🌍 Real World
Arrays are used to store lists of related data, like prices of items in a shop. Filtering arrays helps find items that meet certain conditions, such as expensive products.
💼 Career
Understanding arrays and how to filter them is essential for many programming jobs, including data analysis, app development, and backend services.
Progress0 / 4 steps