#---------------------------------------------- Write a program to check whether a number(accepted from user) is present in a list. sol A=[1,2,3,4,5,6,7,8,9,10] print(A) f=0 n=int(input("enter no which u want to search")) for i in A: if i==n: f=1 break else: f=0 if(f==1): print("present") else: print("not present") #-------------------------------------------------- Name a function which is used to find the largest number from a list. ans max() #------------------------------------------------- _______function returns the smallest value from the list. ans min() #------------------------------------------------- max() function works in a list which have all values of same data type.(T/F) ans false #--------------------------------------------------- ASCII value of 'A' is ______ ans 65 #-------------------------------------------------- Write a program to input a number and count the occurrence of that number in the given list. A=[34,21,3,12,34,56,76,5,4,21,12,34] ans A=[34,21,3,12,34,56,76,5,4,21,12,34] print(A) n=int(input("enter no which u want to count")) print(A.count(n)) #-------------------------------------------------- What is the differnce between del statement and pop() function. ans pop() - this function will delete the element according to particular position,by default this function delete last element. delete- this fucntion will delete according to range or multiple element. #------------------------------------------------- Name the function/statement which can delete more than one element from the list. ans del #------------------------------------------------ Write a program to delete /remove all the negative elements form the list. ans A=[1,2,3,4,5,6,7,8,9,10] d=[] for i in A: if(i>0): d.append(i) print(d) #---------------------------------------------- WAP to accept 10 numbers from the user, if the number is odd and then add that number to the list. (input numbers are: 1,2,3,4,5,6,7,8,9,10) sol A=[1,2,3,4,5,6,7,8,9,10] d=[] for i in A: if(i%2!=0): d.append(i) print(d)