Friday, March 31, 2023

LIST PYTHON PROGRAMMING

                LIST PYTHON PROGRAMMING

     stationery = ["pen","pencil","scale","eraser","marker"]

     x = str(input("enter the item name x is :"))

      print("The item is ",x)

      if x in stationery:

          print("The item is available in stationery")

     else:

         print("The item is not available in stationry")

      OUTPUT:

     enter the item name x is :1

      The item is  1

       The item is not available in stationry


LENGTH AND TYPE PYTHON PROGRAMMING

                                     LENGTH AND TYPE PYTHON PROGRAMMING



x = ["apple","orange","banana","kiwi","grapes"]

print(len(x))
print(type(x))

y = [12,"ramya",32.5,"bala",66,100,12,"ramya",66]
print(len(y))
print(type(y))

z = list(("pen","book",100,0.98,"eraser"))
print(z)
print(len(z))
print(type(z))

OUTPUT:
5

<class 'list'>
9
<class 'list'>
['pen', 'book', 100, 0.98, 'eraser']
5
<class 'list'>



























ARRAY PYTHON PROGRAMMING

                         ARRAY PYTHON PROGRAMMING 


           seats = [1,2,3,4,5,6,7,8,9,10]
           print("seats in bus :",seats)
          x = int(input("enter the seat no :"))
          availableseats = [1,3,5,7,9]
          notavailableseats = [2,4,6,8,10]
          if x in availableseats:
              print("the seats are availble")
   else:
        print("the seats are not available")
      
          OUTPUT:

      seats in bus : [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
      enter the seat no :1
      the seats are availble













USD TO INR C++ PROGRAMMING

  NALLAMUTHU GOUNDER MAHALINGAM COLLEGE                                                 POLLACHI-642001                                     ...