ACTIVITY: Master Python List Data Structures
Create 50 Python Files
- Create 50 Python files, each focusing on list manipulation.
GitHub Commit Requirement
You must make 50 commits in your GitHub repository, with each commit corresponding to the creation or update of a Python file.
Example commit messages:
"add userdata.py"
"update userdata.py"
File Requirements
- Each Python file should involve list manipulation.
Create documentation on medium.com or hashnode.com Explain your code and include the repository link
Don't use AI to generate your code. Instead, focus on mastering and understanding list data structures in Python.
Example for student_name_list.py:
Create a Python file named student_name_list.py that performs the following tasks:
Create a list of 20 student names.
a. Print the entire list.
b. Access and print the 15th index.
- Example: print("15th index is", list[14])
c. Update the 12th index to "John".
Example: list[11] = "John"
Print the updated list.
d. Delete the 10th index.
Example: del list[9]
Print the updated list.
e. Slice the list from index 2 to 5 and print the sliced portion.
f. Print the last index of the list.
- Example: print("Last index is", list[-1])
2.
animal_
list.py
Create a list of 10 animal names.
Print the entire list.
Access and print the 3rd index.
Update the 6th index to "Elephant".
Delete the 8th index.
Print the last index.
3. color_
list.py
Create a list of 15 colors.
Print the entire list.
Access and print the 10th index.
Update the 4th index to "Purple".
Delete the 5th index.
Slice the list from index 2 to 8.
Print the last index.
4. fruit_
list.py
Create a list of 12 fruits.
Print the entire list.
Access and print the 9th index.
Update the 2nd index to "Mango".
Delete the 10th index.
Slice the list from index 4 to 7.
Print the last index.
5. vegetable_
list.py
Create a list of 7 vegetables.
Print the entire list.
Access and print the 5th index.
Update the 3rd index to "Spinach".
Delete the 6th index.
Print the last index.
6. movie_
list.py
Create a list of 20 movie titles.
Print the entire list.
Access and print the 12th index.
Update the 15th index to "Inception".
Delete the 18th index.
Slice the list from index 8 to 13.
Print the last index.
7. game_
list.py
Create a list of 15 video game titles.
Print the entire list.
Access and print the 7th index.
Update the 4th index to "Minecraft".
Delete the 9th index.
Slice the list from index 5 to 10.
Print the last index.
8. planet_
list.py
Create a list of 8 planet names.
Print the entire list.
Access and print the 3rd index.
Update the 7th index to "Pluto".
Delete the 4th index.
Print the last index.
9. language_
list.py
Create a list of 14 programming languages.
Print the entire list.
Access and print the 11th index.
Update the 9th index to "Python".
Delete the 13th index.
Slice the list from index 5 to 12.
Print the last index.
10. flower_
list.py
Create a list of 10 flower names.
Print the entire list.
Access and print the 5th index.
Update the 8th index to "Rose".
Delete the 2nd index.
Print the last index.
11. author_
list.py
Create a list of 12 famous authors.
Print the entire list.
Access and print the 6th index.
Update the 4th index to "Mark Twain".
Delete the 10th index.
Slice the list from index 3 to 8.
Print the last index.
12. language_spoken_
list.py
Create a list of 20 languages spoken around the world.
Print the entire list.
Access and print the 13th index.
Update the 10th index to "Spanish".
Delete the 16th index.
Slice the list from index 6 to 11.
Print the last index.
13. mountain_
list.py
Create a list of 8 mountain names.
Print the entire list.
Access and print the 5th index.
Update the 3rd index to "Everest".
Delete the 6th index.
Print the last index.
14. company_
list.py
Create a list of 10 company names.
Print the entire list.
Access and print the 7th index.
Update the 5th index to "Apple".
Delete the 8th index.
Print the last index.
15. pokemon_
list.py
Create a list of 15 Pokémon names.
Print the entire list.
Access and print the 9th index.
Update the 12th index to "Pikachu".
Delete the 10th index.
Slice the list from index 4 to 7.
Print the last index.
16. animal_species_
list.py
Create a list of 7 animal species.
Print the entire list.
Access and print the 2nd index.
Update the 5th index to "Gorilla".
Delete the 6th index.
Print the last index.
17. historical_figures_
list.py
Create a list of 10 historical figures.
Print the entire list.
Access and print the 8th index.
Update the 4th index to "Nelson Mandela".
Delete the 7th index.
Print the last index.
18. invention_
list.py
Create a list of 8 famous inventions.
Print the entire list.
Access and print the 6th index.
Update the 2nd index to "Lightbulb".
Delete the 5th index.
Print the last index.
19. holiday_
list.py
Create a list of 12 holidays.
Print the entire list.
Access and print the 9th index.
Update the 3rd index to "Christmas".
Delete the 11th index.
Slice the list from index 2 to 7.
Print the last index.
20. dessert_
list.py
Create a list of 10 desserts.
Print the entire list.
Access and print the 4th index.
Update the 6th index to "Chocolate Cake".
Delete the 3rd index.
Print the last index.
21. festival_
list.py
Create a list of 15 festivals around the world.
Print the entire list.
Access and print the 7th index.
Update the 11th index to "Diwali".
Delete the 9th index.
Slice the list from index 5 to 12.
Print the last index.
22. continent_
list.py
Create a list of 7 continents.
Print the entire list.
Access and print the 4th index.
Update the 2nd index to "Africa".
Delete the 6th index.
Print the last index.
23. furniture_
list.py
Create a list of 12 furniture items.
Print the entire list.
Access and print the 8th index.
Update the 5th index to "Sofa".
Delete the 10th index.
Print the last index.
24. social_media_
list.py
Create a list of 10 social media platforms.
Print the entire list.
Access and print the 5th index.
Update the 3rd index to "Instagram".
Delete the 8th index.
Print the last index.
25. sports_
list.py
Create a list of 10 popular sports.
Print the entire list.
Access and print the 6th index.
Update the 4th index to "Basketball".
Delete the 9th index.
Print the last index.
26. music_genre_
list.py
Create a list of 15 music genres.
Print the entire list.
Access and print the 10th index.
Update the 5th index to "Jazz".
Delete the 7th index.
Slice the list from index 3 to 8.
Print the last index.
27. building_
list.py
Create a list of 8 famous buildings.
Print the entire list.
Access and print the 5th index.
Update the 2nd index to "Eiffel Tower".
Delete the 6th index.
Print the last index.
28. actor_
list.py
Create a list of 10 famous actors.
Print the entire list.
Access and print the 7th index.
Update the 3rd index to "Leonardo DiCaprio".
Delete the 8th index.
Print the last index.
29. school_subject_
list.py
Create a list of 12 school subjects.
Print the entire list.
Access and print the 6th index.
Update the 8th index to "Mathematics".
Delete the 4th index.
Slice the list from index 2 to 5.
Print the last index.
30. tool_
list.py
Create a list of 10 tools used in carpentry.
Print the entire list.
Access and print the 4th index.
Update the 7th index to "Hammer".
Delete the 5th index.
Print the last index.
31. technology_inventions_
list.py
Create a list of 15 modern technology inventions.
Print the entire list.
Access and print the 11th index.
Update the 8th index to "Smartphone".
Delete the 14th index.
Slice the list from index 5 to 10.
Print the last index.
32. animal_habitats_
list.py
Create a list of 8 animal habitats.
Print the entire list.
Access and print the 5th index.
Update the 3rd index to "Savannah".
Delete the 6th index.
Print the last index.
33. job_titles_
list.py
Create a list of 10 job titles.
Print the entire list.
Access and print the 6th index.
Update the 5th index to "Software Engineer".
Delete the 9th index.
Print the last index.
34. ocean_
list.py
Create a list of 5 oceans.
Print the entire list.
Access and print the 3rd index.
Update the 2nd index to "Pacific Ocean".
Delete the 4th index.
Print the last index.
35. bird_species_
list.py
Create a list of 12 bird species.
Print the entire list.
Access and print the 9th index.
Update the 6th index to "Eagle".
Delete the 8th index.
Slice the list from index 3 to 7.
Print the last index.
36. currency_
list.py
Create a list of 10 world currencies.
Print the entire list.
Access and print the 4th index.
Update the 7th index to "Euro".
Delete the 9th index.
Print the last index.
37. recipe_
list.py
Create a list of 15 recipes.
Print the entire list.
Access and print the 12th index.
Update the 9th index to "Lasagna".
Delete the 11th index.
Slice the list from index 5 to 10.
Print the last index.
38. drink_
list.py
Create a list of 8 popular drinks.
Print the entire list.
Access and print the 4th index.
Update the 3rd index to "Coffee".
Delete the 7th index.
Print the last index.
39. university_
list.py
Create a list of 10 universities.
Print the entire list.
Access and print the 6th index.
Update the 4th index to "Harvard University".
Delete the 9th index.
Print the last index.
40. festival_celebration_
list.py
Create a list of 10 festival celebrations.
Print the entire list.
Access and print the 5th index.
Update the 3rd index to "Thanksgiving".
Delete the 7th index.
Print the last index.
41. continent_country_
list.py
Create a list of 15 countries and the continents they belong to.
Print the entire list.
Access and print the 9th index.
Update the 10th index to "Australia".
Delete the 12th index.
Slice the list from index 4 to 8.
Print the last index.
42. dinosaur_
list.py
Create a list of 8 dinosaur names.
Print the entire list.
Access and print the 4th index.
Update the 6th index to "Tyrannosaurus Rex".
Delete the 7th index.
Print the last index.
43. natural_landmark_
list.py
Create a list of 10 natural landmarks.
Print the entire list.
Access and print the 8th index.
Update the 5th index to "Grand Canyon".
Delete the 9th index.
Print the last index.
44. land_animal_speed_
list.py
Create a list of 12 land animals and their speeds.
Print the entire list.
Access and print the 7th index.
Update the 9th index to "Cheetah - 120 km/h".
Delete the 10th index.
Slice the list from index 3 to 7.
Print the last index.
45. river_
list.py
Create a list of 10 famous rivers.
Print the entire list.
Access and print the 6th index.
Update the 8th index to "Nile River".
Delete the 9th index.
Print the last index.
46. volcano_
list.py
Create a list of 7 famous volcanoes.
Print the entire list.
Access and print the 4th index.
Update the 3rd index to "Mount Vesuvius".
Delete the 5th index.
Print the last index.
47. waterfall_
list.py
Create a list of 10 famous waterfalls.
Print the entire list.
Access and print the 8th index.
Update the 5th index to "Niagara Falls".
Delete the 9th index.
Print the last index.
48. famous_bridge_
list.py
Create a list of 8 famous bridges.
Print the entire list.
Access and print the 3rd index.
Update the 6th index to "Golden Gate Bridge".
Delete the 7th index.
Print the last index.
49. world_wonders_
list.py
Create a list of 7 wonders of the world.
Print the entire list.
Access and print the 4th index.
Update the 2nd index to "Great Wall of China".
Delete the 5th index.
Print the last index.
50. space_missions_
list.py
Create a list of 10 space missions.
Print the entire list.
Access and print the 7th index.
Update the 4th index to "Apollo 11".
Delete the 6th index.
Print the last index.