Skip to content

Latest commit

 

History

History
14 lines (12 loc) · 967 Bytes

README.md

File metadata and controls

14 lines (12 loc) · 967 Bytes

This repository contains Python scripts that demonstrate various operations and tasks related to working with lists in Python.

Task Descriptions:

  • Task 1: Create a list of numbers from 1 to 10 and print it.
  • Task 2: Create a list of fruit names, add a new fruit, and print the updated list.
  • Task 3: Prompt the user to input a list of numbers, then print only the even numbers from that list.
  • Task 4: Create two lists of numbers, merge them into one list, and sort it in ascending order.
  • Task 5: Write a function to calculate the sum of all numbers in a given list.
  • Task 6: Create a list of words and sort it in alphabetical order.
  • Task 7: Find the largest and smallest elements in a list of numbers and print them.
  • Task 8: Replace all negative numbers in a list with 0.
  • Task 9: Take two lists as input and return a list containing only the common elements from both lists.
  • Task 10: Check if a list contains at least one number divisible by 5.