Task-1

 

Level 1 – Basics

  1. Create a list of 10 numbers and:
    • Print the first element.
    • Print the last element.
    • Print the length of the list.
  2. Take a list of names and:
    • Print each name using a for loop.
    • Print the names in reverse order.
  3. Create a list of 5 fruits. Ask the user to enter a fruit and check if it is in the list or not.
  4. Create a list with mixed data types (integer, float, string). Print each element with its type using type().
  5. Write a program to add, remove, and update an element in a list.

Comments

Popular posts from this blog

Python Fundamentals

Unit-3: Database Concepts and the SQL