Answer to Question #322571 in Python for mannu

Question #322571

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.


1
Expert's answer
2022-04-02T09:58:52-0400
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])

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS