Page 376 - Information_Practice_Fliipbook_Class11
P. 376

print(p, end = '$')

                   break
               else:
                   print(p * 2, end = '*')
               p = p + 3

            (v)
           message = "Come and have a look"
           print("Me" in message or "Om" in message, message.find('a'), sep = '!!!')
          34.   Sanjana wants to create a program for her school library. She wants to store the following data in the form of a
            dictionary:

           ● Book Id as key

           ● Author name and price as values

            Write a menu driven program to perform the following:
            1. Accept Data

            2. Display Data

            3. Search for book details (by entering book_id)

            4. Exit
          35.   Explain the use of * and + operators with respect to lists in Python. Write a program to accept a list of integers and
            reverse the elements of the list. The program should also display the reversed list.
            Note: Do not use any built-in function or slicing list in the program.










































          362  Touchpad Informatics Practices-XI
   371   372   373   374   375   376   377   378   379   380   381