Page 109 - Computer Genius Class 06
P. 109

2.  Program End
                          list = [10, 20, 30, 40, 50]

                          for a in list
                          if a % 2!= 0
                          print(a, end = ‘ ‘)
                          Program Start
                       3.  Program Start

                          set b to 0
                          while a is equal to 1
                          display the value of a
                          decrease the value of a by 1

                          Program Start
                       4.  Program End
                          set a to 0
                          while b is more than 5
                          display the value of a by 1

                          decrease Hello World
                          Program End




                                                                                        Experiential Learning
                   Competency-based/Application-based questions                         Information Literacy

                   1.   Swara has written a program that has more repeated statements to do a single task, which makes her
                      code difficult to understand. She wants to reduce the number of lines of code in her program. How
                      can she do this?

                   2.   Kirti has created a variable in which she needs to store decimal values. What will be the data type of
                      the variable?
                       i   loat      ii   ool      iii   nt



                                                                                        Critical Thinking
                    LAB Activity                                                        Collaboration


                   A.  To create variable ‘a’ in makecode arcade and assign it a value of 10















                                                                                  More on MakeCode Arcade     107
   104   105   106   107   108   109   110   111   112   113   114