On This Page

This set of Problem Solving and Python Programming Multiple Choice Questions & Answers (MCQs) focuses on Problem Solving And Python Programming Set 15

Q1 | Suppose d = {“john”:40, “peter”:45}, to delete the entry for “john” what command do we use?
Q2 | Suppose d = {“john”:40, “peter”:45}. To obtain the number of entries in dictionary which command do we use?
Q3 | print(list(d.keys()))
Q4 | Which of these about a dictionary is false?
Q5 | Which of the following is not a declaration of the dictionary?
Q6 | ,4))
Q7 | ,4))
Q8 | ))
Q9 | ,"D") print(a)
Q10 | Which of the following isn’t true about dictionary keys?
Q11 | ) print(a)
Q12 | ,9))
Q13 | Which of the statements about dictionary values if false?
Q14 | If a is a dictionary with some key-value pairs, what does a.popitem() do?
Q15 | )
Q16 | print(a)
Q17 | ][1])
Q18 | ,2,3],"check")
Q19 | If b is a dictionary, what does any(b) do?
Q20 | ]
Q21 | ]
Q22 | ]
Q23 | To open a file c:\scores.txt for reading, we use                            
Q24 | To open a file c:\scores.txt for writing, we use                          
Q25 | To open a file c:\scores.txt for appending data, we use