Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 86 - Math_Genius_1 2
P. 86

    fLVªax (String)% ;g MsVk çdkj o.kZekyk] la[;kvksa vkSj fo'ks"k çrhdksa lfgr o.kks± dk ,d Øe lax`ghr djrk
                            gSA ,d fLVªax eku ,dy ;k nksgjs m¼j.k fpg~uksa osQ vanj ifjHkkf"kr fd;k x;k gSA
                            mnkgj.k osQ fy,% s1 = 'Py' ;k s2 = "thon"
                          lwph (List)% lwph MsVk çdkj oxZ dks"Bd osQ Hkhrj ekuksa dh  Ük`a•yk dks lax`ghr dj ldrk gSA
                            mnkgj.k osQ fy,% L = [23, 13.12, 2802, 'Orange',  "Education"]
                          Viy (Tuple)% Viy MsVk çdkj dks"Bd osQ Hkhrj ewY;ksa dh  Ük`a•yk dks lax`ghr dj ldrk gSA
                            mnkgj.k osQ fy,% T = (23, 23.07, 2112007, "Python")
                           'kCndks'k (Dictionary)% ,d 'kCndks'k { } dks"Bd osQ Hkhrj fdlh Hkh çdkj osQ oqaQth&ewY; tksM+s dk laxzg gSA
                            mnkgj.k osQ fy,% dict = {1:'abc', 'x':4, 2:8}

                          dksbZ ugha (None)% ;g MsVk çdkj ewY; dh vuqifLFkfr dk çfrfuf/Ro djrk gSA mnkgj.k osQ fy,] num1 = None

                          vkWijsVj (Operators)
                      ik;Fku esa vkWijsVj fo'ks"k çrhd gSa] ftudk mi;ksx vadxf.kr ;k rk£dd x.kuk djus osQ fy, fd;k tkrk gSA okafNr
                      ifj.kke çkIr djus osQ fy, mudk mi;ksx vkWijsaM ;k ewY;ksa osQ lkFk fd;k tkrk gSA

                      mnkgj.k osQ fy,]   5 + 3   vkWijsVj

                                        vkWijsaM

                      vkWijsVj fofHkUu izdkj osQ gksrs gSa] tks bl çdkj gSa%
                         vFkZesfVd vkWijsVj          fjys'kuy vkWijsVj            ykWftdy vkWijsVj
                      vkb,] bu ij foLrkj ls ppkZ djrs gSaA

                      vFkZesfVd vkWijsVj (Arithmetic Operator)
                      bu vkWijsVjksa dk mi;ksx vk/kjHkwr xf.krh; x.kuk djus osQ fy, fd;k tkrk gSA

                        vkWijsVj                  uke                   flaVSDl    mnkgj.k (a = 11, b = 4)      vkmViqV

                           +       tek (Addition)                       a + b            >>> a + b                 15
                           –       ?kVk (Subtraction)                    a – b           >>> a – b                 7

                            *      xq.kk (Multiplication)                a * b           >>> a * b                 44
                            /      Hkkx (Division)                       a / b           >>> a / b                2.75
                           //      iw.kk±d (Floor or Integer Division)  a // b          >>> a // b                 2

                           %       'ks"k (Remainder)                    a % b            >>> a % b                 3
                           **      ?kkrkad (Exponentiation)             a ** b          >>> a ** b               14641

                      vkb,] vadxf.krh; vkWijsVjksa dk mi;ksx djosQ ,d ljy
                      ik;Fku çksxzke fy•sa%

                      LVsi 1  Start ij fDyd djsa → All programs →

                             Python 3.7 → IDLE(Python 3.7 32-bit)
                      LVsi 2  File ij fDyd djsa → New File.
                             fn•k, x, vuqlkj laiknd foaMks esa dksM Vkbi djsaA

                                                                                      izksxzke fy[kkuk (Writing a program)

                         84  Play (Ver. 1.0)-VIII

| 81 82 83 84 85 86 87 88 89 90 91 |