Basic HTML Version

|  | Table of Contents |  | View Full Version

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

    huLs() VtõþLkLkku WÃkÞkuøk fhðkLke Mkk{kLÞ ðkõÞh[Lkk Lke[u ykÃku÷ Au.
                          huLs(yuLk): 0 Úke (n–1) MkwÄe þY Úkíke Ãkqýo MktÏÞkykuLkku Mk{qn sLkhux fhu Au.

                         WËknhý : huLs(6) [0, 1, 2, 3, 4, 5] Lke Mk{fûk Au.
                          huLs(Mxkxo, MxkuÃk): þYykíkÚke ‘MxkuÃk–1’ MkwÄe ÃkqýkOf MktÏÞkykuLkku Mk{qn sLkhux fhu Au.

                         WËknhý: huLs(3, 9) [3, 4, 5, 6, 7, 8] Lke Mk{fûk Au.
                          huLs(Mxkxo, MxkuÃk, MxuÃk_MkkRÍ): rzVkuÕx YÃku, MxuÃk_MkkRÍ Lke rft{ík = 1 yLku 1 Lkk íkVkðík MkkÚku sLkhux ÚkÞu÷ MktÏÞkyku. òufu, ykÃkýu
                         ykÃkýe sYrhÞkík {wsçk MxuÃk_MkkRÍ Lke rft{ík MÃkü fheLku MktÏÞkyku sLkhux fhe þfeyu Aeyu.
                         WËknhý: huLs(1, 14, 2) [1, 3, 5, 7, 9,11,13] Lke Mk{fûk Au.

                       «kuøkúk{ 1: Võík MxkuÃk ðuÕÞwLkku WÃkÞkuøk fheLku 0 Úke 7 MkwÄeLkk ÃkqýkOfku AkÃkðk.

                          Program1.py

                       File  Edit  Format   Run    Options   Window    Help

                       for i in range (8):
                         print(i)

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

                          Output

                       0
                       1
                       2
                       3
                       4
                       5
                       6
                       7

                       «kuøkúk{ 2: Vkuh ÷qÃkLkku WÃkÞkuøk fheLku ÃkuxLko r«Lx fhðk.

                       *
                       **
                       ***
                       ****                                                                   Output
                       *****
                       ******                                                              *
                       *******
                       ********                                                            **
                       *********                                                           ***
                            Program2.py                                                    ****

                         File  Edit   Format     Run    Options    Window     Help         *****
                                                                                           ******
                         #Program to create a pattern using for loop                       *******
                         for a in range(1,10):                                             ********
                             print('*'*a)                                                  *********

                      116       Play (Ver. 2.0)-VIII

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