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

Problem Solving and Python Programming MCQs | Page - 23

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.

M

Mr. Dubey • 51.27K Points
Coach

Q. 221) ): print(foo(i))

(A) [0] [1] [2]
(B) [0] [0, 1] [0, 1, 2]
(C) [1] [2] [3]
(D) [1] [1, 2] [1, 2, 3]
View Answer Discuss Share

M

Mr. Dubey • 51.27K Points
Coach

Q. 222) Suppose list1 is [3, 5, 25, 1, 3], what is min(list1)?

(A) 3
(B) 5
(C) 25
(D) 1
View Answer Discuss Share

M

Mr. Dubey • 51.27K Points
Coach

Q. 223) Suppose list1 is [1, 5, 9], what is sum(list1)?

(A) 1
(B) 9
(C) 15
(D) error
View Answer Discuss Share

M

Mr. Dubey • 51.27K Points
Coach

Q. 224) To shuffle the list(say list1) what function do we use?

(A) list1.shuffle()
(B) shuffle(list1)
(C) random.shuffle(list1)
(D) random.shufflelist(list1)
View Answer Discuss Share

M

Mr. Dubey • 51.27K Points
Coach

Q. 225) Suppose list1 is [4, 2, 2, 4, 5, 2, 1, 0], Which of the following is correct syntax for slicing operation?

(A) print(list1[0])
(B) print(list1[:2])
(C) print(list1[:-2])
(D) all of the mentioned
View Answer Discuss Share

M

Mr. Dubey • 51.27K Points
Coach

Q. 226) Suppose list1 is [2, 33, 222, 14, 25], What is list1[-1]?

(A) error
(B) none
(C) 25
(D) 2
View Answer Discuss Share

M

Mr. Dubey • 51.27K Points
Coach

Q. 227) Suppose list1 is [2, 33, 222, 14, 25], What is list1[:-1]?

(A) [2, 33, 222, 14]
(B) error
(C) 25
(D) [25, 14, 222, 33, 2]
View Answer Discuss Share

M

Mr. Dubey • 51.27K Points
Coach

Q. 228) >>>print(names[-1][-1])

(A) a
(B) daman
(C) error
(D) n
View Answer Discuss Share

M

Mr. Dubey • 51.27K Points
Coach

Q. 229) print sum

(A) 11
(B) 12
(C) 21
(D) 22
View Answer Discuss Share

M

Mr. Dubey • 51.27K Points
Coach

Q. 230) Suppose list1 = [0.5 * x for x in range(0, 4)], list1 is:

(A) [0, 1, 2, 3]
(B) [0, 1, 2, 3, 4]
(C) [0.0, 0.5, 1.0, 1.5]
(D) [0.0, 0.5, 1.0, 1.5, 2.0]
View Answer Discuss Share

Explore Sets

Problem Solving and Python Programming MCQs Set 1

Problem Solving and Python Programming MCQs Set 2

Problem Solving and Python Programming MCQs Set 3

Problem Solving and Python Programming MCQs Set 4

Problem Solving and Python Programming MCQs Set 5

Problem Solving and Python Programming MCQs Set 6

Problem Solving and Python Programming MCQs Set 7

Problem Solving and Python Programming MCQs Set 8

Problem Solving and Python Programming MCQs Set 9

Problem Solving and Python Programming MCQs Set 10

Problem Solving and Python Programming MCQs Set 11

Problem Solving and Python Programming MCQs Set 12

Problem Solving and Python Programming MCQs Set 13

Problem Solving and Python Programming MCQs Set 14

Problem Solving and Python Programming MCQs Set 15

Problem Solving and Python Programming MCQs Set 16

Problem Solving and Python Programming MCQs Set 17

Problem Solving and Python Programming MCQs Set 18

Problem Solving and Python Programming MCQs Set 19

Problem Solving and Python Programming MCQs Set 20

Problem Solving and Python Programming MCQs Set 21

Problem Solving and Python Programming MCQs Set 22

Problem Solving and Python Programming MCQs Set 23

Problem Solving and Python Programming MCQs Set 24

Problem Solving and Python Programming MCQs Set 25

Problem Solving and Python Programming MCQs Set 26

Problem Solving and Python Programming MCQs Set 27

Problem Solving and Python Programming MCQs Set 28

Problem Solving and Python Programming MCQs Set 29

Problem Solving and Python Programming MCQs Set 30

Problem Solving and Python Programming MCQs Set 31

Problem Solving and Python Programming MCQs Set 32

Problem Solving and Python Programming MCQs Set 33

Problem Solving and Python Programming MCQs Set 34

Problem Solving and Python Programming MCQs Set 35

Problem Solving and Python Programming MCQs Set 36

Problem Solving and Python Programming MCQs Set 37

Problem Solving and Python Programming MCQs Set 38

Problem Solving and Python Programming MCQs Set 39

Problem Solving and Python Programming MCQs Set 40

Problem Solving and Python Programming MCQs Set 41

Problem Solving and Python Programming MCQs Set 42

Problem Solving and Python Programming MCQs Set 43