Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 85 - Math_Genius_1 2
P. 85

    osfj,cy ukedj.k osQ fu;e (Rules of Naming Variables)
                     osfj,cy ukedj.k osQ fu;e gSa%
                       (i)  osfj,cy uke fdlh v{kj (a–z, A–Z) ;k ,d vaMjLdksj (_) ls 'kq: gksuk pkfg,A

                       (ii)  osfj,cy uke fdlh vad ls 'kq: ugha gks ldrk gSA
                       (iii)  dhoMZ dk ç;ksx osfj,cy ukeksa osQ :i esa ugha fd;k tk ldrk gSA
                       (iv)   osfj,cy esa osQoy vYiQk&U;wesfjd v{kj vkSj vaMjLdksj (A–Z nksuksa cM+s vkSj NksVs) vkSj (0–9) la[;k,¡ gks
                            ldrh gSaA
                       (v)  !, @, #, $, %, tSls fo'ks"k ¯lcy dk ç;ksx osfj,cy uke esa fd;k tk ldrk gSA
                       (vi)  osfj,cy uke osQl lsalhfVo gksrs gSaA
                     oqQN ekU; osfj,cy ukeksa osQ mnkgj.k%

                     Gaurav123,  mygood_book,  _usha93,  MiraYadav,  age,  vkfnA
                     oqQN vekU; osfj,cy osQ mnkgj.k%

                     1_Name, @Address, 1234, –Age

                     eYVhiy osfj,cy vlkbUesaV (Multiple Variable Assignment)
                     ik;Fku gesa ,dlkFk dbZ osfj,cy osQ fy, ,d oSY;w fufnZ"V djus dh vuqefr nsrk gSA

                     mnkgj.k osQ fy,]
                            a = b = c = 32
                     mijksÙkQ mnkgj.k esa] lHkh osfj,cy a, b vkSj c dks 32 eku fn;k tk,xkA
                     ge ,d lkFk dbZ osfj,cy osQ fy, dbZ oSY;w Hkh vlkbu dj ldrs gSaA
                     mnkgj.k osQ fy,]

                            a, b, c = 32,  96.4 , "Aryan"
                     mijksÙkQ mnkgj.k esa] osfj,cy a dks oSY;w 32] osfj,cy b dks oSY;w 96-4 vkSj osfj,cy c dks “Aryan”  oSY;w fn;k tk,xkA

                           S
                         djsDVj lsV (Character Set)
                     oSQjsDVj lsV dk vFkZ gSµ oSQjsDVj ;kuh& v{kj] vad ;k fo'ks"k fpg~u] ftudk mi;ksx ik;Fku Hkk"kk esa çksxzke fy•us
                     osQ fy, fd;k tk ldrk gSA
                     v{kj          A–Z  or  a–z
                     vad           0–9
                     fo'ks"k fpg~u   ~ ‘ ‘ ! @ # $ % ^ &  ( ) * - _ + = : \ ] {  } ; “ < > , ? | `

                         dhoMZ (Keywords)
                     ;s fj”koZ 'kCn gSa ftudk mi;ksx osfj,cy ukeksa osQ :i esa ugha fd;k tk ldrk D;ksafd os vuqoknd osQ fy, ,d fo'ks"k
                     vFkZ j•rs gSaA ik;Fku esa] dhoMZ osQl lsaflfVo gksrs gSaA
                     ik;Fku esa oqQN dhoMZ osQ mnkgj.k gSa%
                     True] elif] del] if] None] False] import] else] vkfnA

                         MsVk Vkbi (Data Types)
                     osfj,cy esa LVksj fd, tk ldus okys MsVk ;k oSY;w osQ çdkj MsVk Vkbi dgykrs gSaA
                     ik;Fku osQ Ng ekud MsVk çdkj gSa] tks bl çdkj gSa%
                         la[;k (Number)% ;g MsVk çdkj iw.kk±d eku] yacs eku] ÝyksfVax ikWbaV uacj lfgr la[;kRed ekuksa dks lax`ghr

                          djrk gSA mnkgj.k osQ fy,% a = 3 ;k marks = 99.5
                                                                                                  ik;Fku dk ifjp;   83

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