You are on page 1of 1

Create an array of student names

students = ("Jaidyn", "Ashton", "Callum", "Joel")

How do you print the 2nd student's name?

students = ("Jaidyn", "Ashton", "Callum", "Joel")

print (students[1])

add another student to arrStudents later in the code.


students = ("Jaidyn", "Ashton", "Callum", "Joel")

students.append("Jordan")

Create a for loop that prints out the names of each student in arrStudents with the
word hello. E.g "Hello John"

students = ("Jaidyn", "Ashton", "Callum", "Joel")

for i in students:
print ("Hello", i)

Create a while loop that prints out the names of each student in arrStudents with
the word hello. E.g "Hello John"

students = ("Jaidyn", "Ashton", "Callum", "Joel")

length = len(students)
i=0

while i < length:


print("Hello", students[i])
i += 1

You might also like