Section 8 Practice Tasks

Practice Tasks for Lists

Task One:
Write a program with a blank list. Append your three favourite ice-cream flavours to this list and print the list.

Task Two:
Write a program with a list of 5 random numbers. Delete the first and third numbers then append a new number. Print the list.

Task Three:
Write a program with a list of three random animals. Write an input line that lets the user type an animal. Add what the user has written to the list and print the list

Task Four:
Sort your list from task two into order. Then print the list.


< Back to Section Eight