Write a program that will create a list of four animals, and will use a For loop to print out each of the animals in the list. First write an algorithm in the online editor below.
animals = ["dog", "fox", "lion", "elephant"]
n = len(animals)
for i in range(4):
print('The ', i+1, 'th animal is ', sep='', end='')
print(animals[i])
Comments
Leave a comment