Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 119 - Gujrati Play V2.0 Class 8 Flipbook
P. 119

    «kuøkúk{ 3: huLs() VtõþLk MkkÚku Vkuh ÷qÃkLkku WÃkÞkuøk fheLku ík{kÁt Lkk{ Lkð ð¾ík r«Lx fhðk {kxu.

                         Program3.py
                      File  Edit  Format   Run    Options   Window    Help

                      #Program to print your name 9 times using the for loop

                      name = input ('Enter your name: ')
                      for i in range(0, 9):
                          print(name)

                     ík{Lku Lke[u {wsçk ykWxÃkwx {¤þu:

                         Output

                      Enter your name: Sambhav
                      Sambhav
                      Sambhav
                      Sambhav
                      Sambhav
                      Sambhav
                      Sambhav
                      Sambhav
                      Sambhav
                      Sambhav

                      «kuøkúk{ 4: RLkÃkwx LktçkhLkku økwýkfkh fkuüf r«Lx fhðk {kxu.

                                                                                                 Output

                         Program4.py                                                          Enter a number: 8
                                                                                              8 × 1 = 8
                      File  Edit  Format    Run   Options   Window    Help                    8 × 2 = 16
                                                                                              8 × 3 = 24
                      #Program to print multiplication table of a number                      8 × 4 = 32
                                                                                              8 × 5 = 40
                      num = int (input('Enter a number: '))                                   8 × 6 = 48
                                                                                              8 × 7 = 56
                      for i in range (1,11):                                                  8 × 8 = 64
                      #printing the table                                                     8 × 9 = 72
                          print(num, '×', i, '=', num*i)                                      8 × 10 = 80

                                                                                                      ÃkkÞÚkkuLk{kt ÷qÃk  117

| 114 115 116 117 118 119 120 121 122 123 124 |