Home / Engineering / Problem Solving and Python Programming MCQs / Page 27

# Problem Solving and Python Programming MCQs | Page - 27

Dear candidates you will find MCQ questions of Problem Solving and Python Programming here. Learn these questions and prepare yourself for coming examinations and interviews. You can check the right answer of any question by clicking on any option or by clicking view answer button.

## `Q. 261) print(points)`

(A) [[1, 2], [3, 1.5], [0.5, 0.5]]
(B) [[3, 1.5], [1, 2], [0.5, 0.5]]
(C) [[0.5, 0.5], [1, 2], [3, 1.5]]
(D) [[0.5, 0.5], [3, 1.5], [1, 2]]

## `Q. 262) ,b)) print(a)`

(A) [2,4]
(B) [ ]
(C) [3,5]
(D) invalid arguments for filter function

## `Q. 263) for i in range(3)]; print(x);`

(A) [0, 1, 2]
(B) [1, 2, 5]
(C) error, **+ is not a valid operator
(D) error, ‘;’ is not allowed

## `Q. 264) ==0: i; else: i+1; for i in range(4)])`

(A) [0, 2, 2, 4]
(B) [1, 1, 3, 3]
(C) error
(D) none of the mentioned

## `Q. 265) Which of the following is the same as list(map(lambda x: x**-1, [1, 2, 3]))?`

(A) [x**-1 for x in [(1, 2, 3)]]
(B) [1/x for x in [(1, 2, 3)]]
(C) [1/x for x in (1, 2, 3)]
(D) error

## `Q. 266) for x in l]`

(A) [1, 1, 1, 1, 1]
(B) [1, 0, 1, 0, 1]
(C) [1, 0, 0, 0, 0]
(D) [0, 1, 0, 1, 0]

## `Q. 267) for y in l2]`

(A) [4, 8, 12, 5, 10, 15, 6, 12, 18]
(B) [4, 10, 18]
(C) [4, 5, 6, 8, 10, 12, 12, 15, 18]
(D) [18, 12, 6, 15, 10, 5, 12, 8, 4]

## `Q. 268) Write the list comprehension to pick out only negative integers from a given list ‘l’.`

(A) [x<0 in l]
(B) [x for x<0 in l]
(C) [x in l for x<0]
(D) [x for x in l if x<0]

## `Q. 269) =[x+y for x, y in zip(l1, l2)] l3`

(A) error
(B) 0
(C) [-20, -60, -80]
(D) [0, 0, 0]

## `Q. 270) Write a list comprehension for number and its cube for l=[1, 2, 3, 4, 5, 6, 7, 8, 9].`

(A) [x**3 for x in l]
(B) [x^3 for x in l]
(C) [x**3 in l]
(D) [x^3 in l]

Download our easy to use, user friendly Android App from Play Store. And learn MCQs with one click.