top of page
Inaugurated by IN-SPACe
ISRO Registered Space Tutor

S0-SA1-0528

What is an Array (Rows and Columns of Objects)?

Grade Level:

Class 2

Maths, Computing, AI (matrices), Data Science

Definition
What is it?

An array is like a special box or a table that holds many items of the same type in an organised way. Imagine arranging your favourite cricket cards in neat rows and columns; that's an array! It helps us keep similar things together and find them easily.

Simple Example
Quick Example

Think about a school timetable. It has rows for different days (Monday, Tuesday, etc.) and columns for different periods (Period 1, Period 2, etc.). Each box in this timetable holds a specific subject for that day and period. This timetable is an array!

Worked Example
Step-by-Step

Let's say you want to store the daily chai sales (in litres) for a tea stall over 3 days, for both morning and evening.

Step 1: Decide what you want to store. Here, it's chai sales in litres.
---Step 2: Decide how many rows and columns you need. We need 3 rows for 3 days and 2 columns for morning/evening.
---Step 3: Draw a table with 3 rows and 2 columns.
| Morning | Evening
---|---------|---------
Day 1| |
Day 2| |
Day 3| |
---Step 4: Fill in the sales data. Let's say:
Day 1: Morning 10 litres, Evening 15 litres
Day 2: Morning 12 litres, Evening 18 litres
Day 3: Morning 9 litres, Evening 14 litres
---Step 5: Your array now looks like this:
| Morning | Evening
---|---------|---------
Day 1| 10 | 15
Day 2| 12 | 18
Day 3| 9 | 14
---Step 6: This organised table is an array of chai sales data.

Why It Matters

Arrays are super important because they help computers store and manage huge amounts of data efficiently. From making your favourite games run smoothly to helping scientists analyse satellite images for ISRO, arrays are everywhere. Learning about them can open doors to careers in software development, data science, and even artificial intelligence.

Common Mistakes

MISTAKE: Trying to put different types of items (like apples and books) into the same array. | CORRECTION: An array is designed to hold items of the SAME type only. If you need to store different types, you might need a different data structure later.

MISTAKE: Forgetting that arrays have a fixed size once created, and trying to add more items than it can hold. | CORRECTION: When you create an array, you usually decide its size first. If you need more space, you'll typically need to create a new, larger array and copy items over.

MISTAKE: Confusing the 'value' stored in an array box with its 'position' (index). | CORRECTION: The value is what's inside the box (e.g., 'Maths' subject). The position (index) is like the box number (e.g., row 1, column 2). They are different.

Practice Questions
Try It Yourself

QUESTION: Imagine an array storing the number of runs scored by a cricket team in 5 different matches: [150, 180, 165, 190, 175]. What is the total number of runs scored? | ANSWER: 860

QUESTION: A small shop records its daily profit for 4 days in an array: [250, 300, 220, 280]. If the shop owner wants to find the profit on the 3rd day, what value should they look for? | ANSWER: 220

QUESTION: You have an array representing the number of students in Class 5, Class 6, and Class 7. It is [45, 50, 48]. If 5 new students join Class 6, and 3 students leave Class 7, what will the new array look like? | ANSWER: [45, 55, 45]

MCQ
Quick Quiz

Which of these best describes an array?

A single box holding one item

A collection of different types of items mixed together

An organised collection of similar items in rows and columns

A random list of numbers

The Correct Answer Is:

C

Option C correctly defines an array as an organised collection of similar items. Options A, B, and D describe other concepts or incorrect uses.

Real World Connection
In the Real World

When you use a food delivery app like Swiggy or Zomato, the app might use arrays to store the menu items, their prices, and quantities from a restaurant. Each restaurant's menu could be an array of dishes, making it easy to display them to you and calculate your bill. Even your phone's contact list is like an array, storing names and numbers in an organised way.

Key Vocabulary
Key Terms

ARRAY: An organised collection of similar items | ROW: A horizontal line of items in an array | COLUMN: A vertical line of items in an array | ELEMENT: A single item stored inside an array | INDEX: The position number of an element in an array

What's Next
What to Learn Next

Great job understanding arrays! Now you're ready to learn about 'Variables' and 'Data Types'. These concepts will show you how to give names to individual pieces of data and understand what kind of data they are, which is super useful when working with elements inside arrays.

bottom of page