Showing posts with the label Data Structure - 1: Linear List

selecting only those correctly entered entries where the first letters of the first name

Q. The Investiture Ceremony is a prestigious event in every school's calend…

What is the difference between a regular 2D list and a ragged List?

Q. What is the difference between a regular 2D list and a ragged List? Answer :…

LA = [1, 4, 9, 16, 25, 36, 49, 64, 81, 168] LB = [num/3 for num in LA if num % 3 == 0]

Q. Predict the output. (i) LA = [1, 4, 9, 16, 25, 36, 49, 64, 81, 168] LB = [nu…

text = [h, e, l, l, o] print (text) vowels = aeiou

Q. What will be the output produced by following code ? text = ['h', &#…

Consider following similar codes (carefully go through these) and predict their outputs.

Q. Consider the following similar codes (carefully go through these) and predic…

What purpose Linear lists data structures are mostly used for?

Q. What purpose Linear lists data structures are mostly used for? Answer :- Lin…

In general, what common operations are performed on different Data Structures?

Q. In general, what common operations are performed on different Data Structure…

Create a two dimensional List in Python that stores runs scored by a batsmen in five overs.

Q. Create a two dimensional List in Python that stores runs scored by a batsmen…

Modify the function deleting an element from a sorted list so that only duplicate entries can be removed.

Q. Modify the function deleting an element from a sorted list so that only dupl…

Write a function to delete an element from a sorted list.

Q. Write a function to delete an element from a sorted list. Answer = def d…

Write a function to insert an element in a sorted list only if it already exists in the list.

Q. Write a function to insert an element in a sorted list only if it already ex…

Write a function to insert an element in a sorted list only if it does not already exist in the list.

Q. Write a function to insert an element in a sorted list only if it does not a…

Fill in the blanks in the following code segment to implement sequential search of the given array.

Q. Fill in the blanks in the following code segment to implement sequential sea…

Suggest corrections for the errors in both the previous questions.

Q. Suggest corrections for the errors in both the previous questions. Answer = …

Find the error in the following list comprehension [good if i 3: else: better for i in range(6)]

Q. Find the error in the following list comprehension: ["good" if i&l…

Find the error. Consider the following code(s) and predict the error(s)

Q. Find the error. Consider the following code(s) and predict the error(s): (i)…

Suggest the correction for the error(s) in previous question's code.

Q. Suggest the correction for the error(s) in previous question's code. Ans…

Find the Error. Consider the following code, which runs correctly at times but gives error at other times.

Q. Find the Error. Consider the following code, which runs correctly at times b…

Predict the output: (i) b = [[9,6],[4,5], [7,7]] x=b[:2] x.append (10) print (x)

Q. Predict the output: (i) b = [[9,6],[4,5], [7,7]] x = b[:2] x.append (10) pri…

Predict the output: def even(n): return n % 2 == 0 list1 = [1,2,3,4,5,6,7,8,9]

Q. Predict the output: def even(n):     return n % 2 == 0 list1 = [1,2,3,4,5,6,…

Load More That is All