Page 100 - TP_V5.1_C8_fb
P. 100

d.  l1 = ['O', 'r', 'a', 'n', 'g', 'e']

                      l1.extend(['E', 'd', 'u', 'c', 'a', 't', 'i', 'o', 'n'])
                      print(l1)
                      print(l1[-3])
                      ______________________________________________________________________________________
                      ______________________________________________________________________________________

                      ______________________________________________________________________________________

                     e.  fruits = ["apple", "banana","cherry"]
                      for x in fruits:
                          print(x)
                      ______________________________________________________________________________________
                      ______________________________________________________________________________________

                  6.  Competency-based/Application-based questions.                                  Experiential Learning

                     a.   Devansh created multiple strings in Python. He now wishes to join the strings to form a
                        single string. Is this possible? How can he do this?

                      ______________________________________________________________________________________
                     b.   Abhishek wants to print his name in Python. He noticed that it got printed in lowercase. How can he
                        change it into uppercase?

                      ______________________________________________________________________________________
                     c.   Kazim made a list in Python and forgot to add a couple of elements into it. Which function can he use
                        to add these elements?

                      ______________________________________________________________________________________




                      LAB ACTIVITY                                                                      Subject Enrichment


                      Visit your computer lab and perform the following actions:
                           In the list given below, only display numbers that are divisible by 4. If there is a number greater
                         than 100, then stop the loop iteration.

                         list = [8, 13, 16, 24, 35, 50, 60, 72, 75, 100, 120, 160]
                           Write a program that counts the total number of digits in the number 542892 and displays it as
                         output.

                           Print the items of the given list in reverse order. list = [25, 35, 45, 55, 65, 75]
                           Write a Python program to take your name as input and make the first and the last letter of your
                         name uppercase and let the other letters remain lowercase.










                   98   Premium Edition-VIII
   95   96   97   98   99   100   101   102   103   104   105