Arrays
Arrays
9618
ARRAYS
Concept Of Arrays
5 "Pappan"
4 "Banto"
3 "Bano"
2 "Pappu"
1 "Ahmed
0 " "Taha"
Nam
Arrays stores multiple values of same
datatype in python we use list as
Arrays under single identifier
Create An Array Names
Names = ["Taha", "Ahmed", "Pappu", "Bano", "Banto", "Pappan"]
Print Ahmed
print(Names[1])
Finding The Length Of Arrays
Length = len(Names)
print(Length)
Print All The Elements
for x in range(len(Names)
print(Names[x])
Practice Question
Names.append("Shabnam")
Practice Question
Ask Numbers form the user and find the average of those
number and when the user types in 0 then stop asking the
number from the user and print the average
4
Create an Array with 5 rows and 4 Columns
Practice Question
Array2D[RowIndex][ColumnIndex]
Accessing Elements In Loops
Outer loop will be for Rows and Inner Loop will be for
Columns
Practice Question
1D Array