List Manipulation || Type C || Sumita Arora || Class 11 || Computer science || Information practices || Solution

Q1. Write a program to increment the elements of a list with a number.

Q2. Write a program that reverses a list of integers (in place).

Q 3. Write a program that input two lists and create a third, that contains all elements of the first followed by all elements of the second.

Q4. Ask the user  to enter a list containing numbers between 1 and 12 then replace all of the entries  in the list that   are greater than 10 with 10.

Q5. Ask the user to enter a list of string. Create a new list that consist  of those strings with there first characters removed.

Q6. Write a program to check if a number is present in the list or not. If the number is present, print the position of the number.
Print an appropriate message if the number is not present in the list.

Q7. Crate the following lists using a for loop:
(a) A list consisting of the integers 0 through 49.
(b) A list consisting the square of the integer 1 through 50
(c) The list [“a”, “bb”, “ccc” , “dddd” ……….] that ends with 26 copies of the letter z.

Q8. Write a program that takes any two list l and m of the same size and adds their elements together to form a new list n whose element are sum of the corresponding elements in l and m.

Q9. Write a program rotates the elements of a list show that the element at the first index moves to the second index ,the element i n second index moves to the third index, etc, and the element in the last index moves to the first index.

Q10. Write a program that reads the n to display 9th term of Fibonacci series: the Fibonacci sequence work as follows:

Q11. Write a program as per following specifications:
(i) return the length of the longest String in the list of a strings str_list. Precondition: the list will contain At least one element.
(ii) L is a list of numbers. return a new list where each element is the corresponding element of list L summed with number num.


Q12. Write a program to read two lists num and denum which contain the numerators and denominators of same fractions at the respective indexes. Then display the smallest fraction along with its index.

Q13. Write a program to display the maximum and minimum values from the specified range of indexes of a list.

Q14. Write a program to move all duplicate values in a list to the end of the list.

Q15. Write a program to compare two equal sized lists and print the first index where they differ.

Additional question ---

Q1. Write a program that reverse an array of integer (in place).

List manipulation Sumita  arora class 11
List manipulation Sumita  arora class 11 Type C Solution


You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post