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

Problem Solving and Python Programming MCQs | Page - 28

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.17K Points
Coach

Q. 271) )*5/9) for x in t]

(A) [0]
(B) 0
(C) [0.00]
(D) error
View Answer Discuss Share

M

Mr. Dubey • 51.17K Points
Coach

Q. 272) Suppose d = {“john”:40, “peter”:45}. To obtain the number of entries in dictionary which command do we use?

(A) d.size()
(B) len(d)
(C) size(d)
(D) d.len()
View Answer Discuss Share

M

Mr. Dubey • 51.17K Points
Coach

Q. 273) print(list(d.keys()))

(A) [“john”, “peter”]
(B) [“john”:40, “peter”:45]
(C) (“john”, “peter”)
(D) (“john”:40, “peter”:45)
View Answer Discuss Share

M

Mr. Dubey • 51.17K Points
Coach

Q. 274) Which of these about a dictionary is false?

(A) the values of a dictionary can be accessed using keys
(B) the keys of a dictionary can be accessed using values
(C) dictionaries aren’t ordered
(D) dictionaries are mutable
View Answer Discuss Share

M

Mr. Dubey • 51.17K Points
Coach

Q. 275) Which of the following is not a declaration of the dictionary?

(A) {1: ‘a’, 2: ‘b’}
(B) dict([[1,”a”],[2,”b”]])
(C) {1,”a”,2”b”}
(D) { }
View Answer Discuss Share

M

Mr. Dubey • 51.17K Points
Coach

Q. 276) ,4))

(A) 1
(B) a
(C) 4
(D) invalid syntax for get method
View Answer Discuss Share

M

Mr. Dubey • 51.17K Points
Coach

Q. 277) ,4))

(A) error, invalid syntax
(B) a
(C) 5
(D) 4
View Answer Discuss Share

M

Mr. Dubey • 51.17K Points
Coach

Q. 278) ,"D") print(a)

(A) {1: ‘a’, 2: ‘b’, 3: ‘c’, 4: ‘d’}
(B) none
(C) error
(D) [1,3,6,10]
View Answer Discuss Share

M

Mr. Dubey • 51.17K Points
Coach

Q. 279) Which of the following isn’t true about dictionary keys?

(A) more than one key isn’t allowed
(B) keys must be immutable
(C) keys must be integers
(D) when duplicate keys encountered, the last assignment wins
View Answer Discuss Share

M

Mr. Dubey • 51.17K Points
Coach

Q. 280) ) print(a)

(A) {1: 5}
(B) {1: 5, 2: 3}
(C) error, syntax error for pop() method
(D) {1: 5, 3: 4}
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