0% found this document useful (0 votes)
6 views4 pages

List Python Tasks

The document outlines ten programming tasks focused on list management in Python. Tasks include creating grocery lists, managing student attendance, maintaining to-do lists, and manipulating fruit and number lists. Each task specifies the initial conditions, user interactions, and expected outputs.

Uploaded by

21fjaydenm
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views4 pages

List Python Tasks

The document outlines ten programming tasks focused on list management in Python. Tasks include creating grocery lists, managing student attendance, maintaining to-do lists, and manipulating fruit and number lists. Each task specifies the initial conditions, user interactions, and expected outputs.

Uploaded by

21fjaydenm
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Task 1:

Write a program that allows the user to maintain a grocery list. The program should
start with an empty list. Allow the user to add items to the list. Display the list after
each addition. End when the user types “done”.

Task 2:
Write a program to manage the attendance of students in a class. The program
should start with a predefined list of students. Allow the user to mark a student as
absent by removing their name. Print the list of remaining students after each
removal.

Task 3:
Write a program to manage a to-do list. The program should start with an empty list.
Allow the user to add tasks and remove tasks. Display the updated list after each
operation.
Task 4:
Write a program that starts with a list of five favourite fruits. Ask the user for their
favourite fruit. Inserts the user’s favourite fruit at the second position. Display the
updated list.

Task 5:
Write a program that starts with a list of numbers. Loops through the list in reverse
order and prints each number.
Task 6:
Write a program that starts with a list containing multiple occurrences of a number.
Removes all occurrences of a specific number. Prints the list after all occurrences
are removed.

Task 7:
Write a program that asks the user how many items they want to add to a list. Uses a
loop to repeatedly add items to the list. Prints the final list.

Task 8:
Write a program that starts with an empty list. Asks the user to add five names to the
list. Sorts the list alphabetically and displays it.

Task 9:
Write a program that starts with a list of five grades. Asks the user for the index of
the grade they want to update and the new grade. Updates the grade using list
indexing. Displays the updated list.

Task 10:
Write a program that takes a number as input. Uses a loop to create a list of the first
10 multiples of that number. Displays the list.

You might also like