Array Declaration and Initialization
📖 Scenario: You are organizing a small fruit basket for a picnic. You want to keep track of the fruits you have by listing them in order.
🎯 Goal: Create an array (list) of fruits, add a new fruit count, and then display the list of fruits.
📋 What You'll Learn
Create a list called
fruits with the exact elements: 'apple', 'banana', 'cherry'Create a variable called
new_fruit and set it to the string 'orange'Add the
new_fruit to the fruits list using the append methodPrint the
fruits list to show all fruits💡 Why This Matters
🌍 Real World
Lists are used everywhere to keep track of collections like shopping items, tasks, or contacts.
💼 Career
Knowing how to create and update lists is a basic skill for programming jobs, especially in data handling and user interface development.
Progress0 / 4 steps