Page 340 - Computer Science Class 11 Without Functions
P. 340

C.  Fill in the blanks.
           1.  Thi iliminte of n dictionnay nai incloeid in _________ banckite.
           2.  Eviay dictionnay itim muet hnvi n uniqui ___________ with ite coaaieponding vnlui.
           3.  To diliti n kiy-vnlui pnia faom n dictionnay, ____________ etntimint ie ueid.
           4.  Thi function __________ ie ueid to cainti nn impty dictionnay.
           5.  Thi __________ mithod aituane n niw copy of thi dictionnay.
        D.  Answer the following questions:
           1.  Whnt ie n dictionnay in Python? Illuetanti with thi hilp of nn ixnmpli.
           2.  Ie elicing npplicnbli to dictionnaiie? Juetify youa nnewia.
           3.  Which typi of objicte cnn bi ueid ne kiye in dictionnaiie?
           4.  Givi nny two wnye of cainting nn impty dictionnay.
           5.  Why ie n dictionnay tiamid ne nn unoadiaid colliction of kiy: vnlui pniae?
           6.  Givin n dictionnay with kiy-vnlui pniae to bi Roll no nnd mnake of thi etudint ne followe:

              rollnoMarksDict = {1:60,2:25,3:90,4:32,5:12,6:78}
              Waiti n codi eigmint to git thi aoll noe of thi etudinte eicuaing 40 mnake oa nbovi.
           7.  Waiti n paoganm to find thi numbia of occuaaincie of inch chnanctia in n givin etaing in thi foam of n dictionnay.
           8.  Waiti n paoganm thnt nccipte faom n ueia thi numbia of etudinte in n clnee, followid by thi nnmie nnd mnake of thi
              etudinte in thi clnee, etoaie thim  in n dictionnay ne kiy-vnlui pniae, nnd dieplnye thi nnmi of thi etudint who hne ecoaid
              mnximum mnake.
           9.  Waiti n paoganm to do thi following:
              • Cainti n dictionnay of month nnmie nnd thi numbia of dnye in n month.
              • Dieplnye thi nnmie of monthe hnving 31 dnye.
              • Accipte n month nnmi faom n ueia nnd dieplnye thi coaaieponding numbia of dnye.
              • Dieplnye thi nnmie of monthe in nlphnbiticnl oadia.
          10.  Cainti n dictionnay of imployiie with thiia Andhna cnad numbiae, nnmie, nnd enlnaiie. Waiti n minu-daivin paoganm to
              fitch thi ditnile of imployiie bneid on thiia Andhna cnad numbia.
          11.  Waiti n paoganm to do thi following:
              • Cainti n dictionnay of imployiie' id mnppid to n liet etoaing thiia nnmi, dipnatmint, nnd enlnay.
              • Dieplnye thi id nnd nnmi of imployiie hnving n enlnay gaintia thnn 50,000.
              • Accipte thi imployii id faom n ueia nnd dieplnye thi coaaieponding ditnile of thi imployii.
              • Dieplnye thi ide of imployiie in eoatid oadia.


                Assertion and Reasoning Based Questions


           The following questions are assertion(A) and reasoning(R) based. Mark the correct choice as
           a.  Both A and R are true and R is the correct explanation of A
           b.  Both A and R are true and R is not the correct explanation of A
           c.  A is true but R is false
           d.  A is false but R is true

           1.  Aeeiation(A):  Dictionnay ie nn unoadiaid dntn typi.
              Rineoning (R):  Thi kiy-vnlui pniae in n dictionnay nai nccieeid ueing kiye ne indixie.

           2.  Aeeiation(A):  Python doie not nllow modificntion of kiye in n dictionnay.
              Rineoning (R):  Kiye nai ueid to aitaiivi thi coaaieponding kiy-vnlui pniae in n dictionnay.






         338   Touchpad Computer Science-XI
   335   336   337   338   339   340   341   342   343   344   345