Lists Long Answer Questions
Lists Long Answer Questions
1. Write a program to print all elements of a list CDays. Where CDays is:
Days=[‘Monday’, ‘Tuesday’,
‘Wednesday’,’Thursday’,’Friday’,’Saturday’,’Sunday’]
2. Write a program to delete all the odd numbers and negative numbers in
a numeric list.
3. Write a program to input a list Num with 10 different integer values and
search a particular value and its position in that list
5. Write a program to merge two sorted lists and return the sorted list as
result
8. Write a program to enter the data given by the user into two 3X4lists
and find the sum of each element store as another 3X4 list.
9. Given a list of integers, L, write code to add the integers and display the
sum.
10.Given a list of integers, write code to calculate and display the sum of all
the odd numbers in the list.
12. Write a program that inputs a list of numbers and shifts all the zeros to
right and all non-zero numbers to left of the list.