Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 106 - Gujrati Play V2.0 Class 6 Flipbook
P. 106

    «kuøkúk{ 2: çkÄk yuMkkRLk{uLx ykuÃkhuxhku fhðk {kxu

                          Program2.py
                       File  Edit  Format   Run    Options   Window    Help

                       #example of arithmetic operators
                       a = 21
                       b = 10
                       c = 0

                       c = a + b
                       print(c)
                       c += a
                       print(c)
                       c *= a
                       print(c)
                       c /= a
                       print(c)
                       c %= a
                       print(c)
                       c **= a
                       print(c)
                       c //= a
                       print(c)

                      WÃkhkuõík «kuøkúk{Lkwt ykWxÃkwx yk «{kýu Au:

                          Output

                       31
                       52
                       1092
                       52.0
                       10.0
                       1e+21
                       4.761904761904762e+19

                      ÷kursf÷ ykuÃkhuxMko
                      ÷kursf÷ ykuÃkhuxhkuLkku WÃkÞkuuøk ykuÃkhuLz íkhefu fÂLzþLk÷ Mxux{uLxTMkLku òuzðk {kxu ÚkkÞ Au. íkuyku Mkk[wt yÚkðk ¾kuxwt Ãkhík fhu Au. ÃkkÞÚkkuLk Lke[uLkk
                      ÷kursf÷ ykuÃkhuxhkuLku MkÃkkuxo fhu Au:

                         ykuÃkhuxh   Lkk{                     ðýoLk                        WËknhý (x=2)           ykWxÃkwx

                          yLku      AND  òu çktLku ykuÃkhuLz Mkk[k nkuÞ íkku íku Mkk[k Ãkhík fhu Au.  (x < 5) yLku (x < 10)  Mkk[wt

                          yÚkðk      OR     òu fkuR yuf ykuÃkhuLz Mkk[wt nkuÞ, íkku íku Mkk[wt Ãkhík fhu   (x < 5) yÚkðk (x < 2)  Mkk[wt
                                            Au.

                          LkÚke     NOT     íku Ãkrhýk{ W÷xkðu Au, òu Ãkrhýk{ Mkk[wt nkuÞ yÚkðk   not [(x < 5) yLku (x < 10)]  ¾kuxwt
                                            Q÷xwt nkuÞ íkkuu ¾kuxwt Ãkhík fhu Au.

                      104       Play (Ver. 2.0)-VI

| 101 102 103 104 105 106 107 108 109 110 111 |