Page 359 - Information_Practice_Fliipbook_Class11
P. 359

14.   Write a program that accepts a list of n numbers and displays the number that appears  the maximum number of
                 times.
             15.   Write a program that accepts the names and hobbies of 10 persons and stores this information in the form of a
                 dictionary. The program should enumerate distinct hobbies.
             16.   Write  a  program  in  Python  that  accepts  the  names  of  the  states  and  the  number  of  districts  in  the  states.
                 The data is stored in a dictionary. Thereafter, the user is asked to enter a state and the number of districts
                 in that state are displayed. Appropriate message is displayed if the name of the state does not exist in the
                 dictionary.
             17.   Ruma has measured the distance between her house and her friend's house in feet. She wants to write a program
                 in Python that accepts distance in feet and displays it in yards and miles. Help her complete the task.
             18.   Write a program that functions like a simple calculator. It accepts two numbers (say, num1 and num2) and displays
                 the following menu:
                 num1 / num2
                 num2 / num1

                 num1 // num2
                 num2 // num1
                 num1 % num2

                 num2 %num1
                Display the result as per the choice entered by the user.
             19.   Write a program that accepts your name and percentile scored in an entrance examination and displays the
                 allocated course and institute as per the table given below:

                                    Percentile Scored             Course                Institute

                                   >= 99                B. Tech. Computer Science    IIT Delhi

                                   >= 97 and < 99       B. Tech. IT                  IIT Kanpur

                                   <97                  B. Tech. Computer Science    NSUT Delhi

             20.  Write a program to accept a number and check whether it is an Armstrong number or not.
                  Note: An Armstrong number is a number that is equal to the sum of the cubes of its digits. For example, 153 is an
                 Armstrong number because 153 = 1  + 5  + 3  = 153.
                                                 3
                                                    3
                                                        3
             21.  Write a program to accept a number (say, n) and print n terms the following sequence of numbers:
                 1, 2, 4 , 7, 11, 16, 22   ( if the value of n is 7)
             22.  Write a program to display the sum of squares of each digit of a given number.
             23.  Write programs to display the following patterns:

                 a.
















                                                                                                      Practical  345
   354   355   356   357   358   359   360   361   362   363   364