Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 88 - Math_Genius_1 2
P. 88

    vkvks tkusa!

                         vkWijsVj izsflMsal& P E D M A S fu;e dks"Bd] ?kkrkad] Hkkx] xq.ku] tksM+ vkSj ?kVko gSA

                      ykWftdy vkWijsVj (Logical Operator)
                      mudk mi;ksx dbZ fLFkfr;ksa dks feykus vkSj mudk ewY;kadu djus osQ fy, fd;k tkrk gSA os ifj.kke osQ :i esa ,d

                      cwfy;u oSY;w ^lR;* ;k ^xyr* fjVuZ djrs gSaA
                                 vkWijsVj                                         o.kZu

                                 & (AND)          ;fn nh xbZ lHkh oaQMh'ku lR; gSa] rks ^lR;* oSY;w fjVuZ gks tkrh gSA

                                  | (OR)          ;fn nh xbZ oaQMh'ku esa ls dksbZ ,d lR; gS] rks ^lR;* oSY;w fjVuZ gks tkrh gSA

                          ik;Fku esa desaV (Comments in Python)
                      desaV dksM dh csgrj le> osQ fy, dksM osQ vanj fy•s x, VsDLV gSaA desaV osQ 'kq: esa gS'k oSQjsDVj (#) fy•k gksrk
                      gSA desaV dksM dk fgLlk ugha gSa vkSj ik;Fku baVjizsVj vuns•k dj nsrk gSA

                      mnkgj.k osQ fy,] #Program on simple calculator
                      ;g ykbu ik;Fku baVjçsVj }kjk ugha i<+h tk,xh cfYd ;g i<+us okys dks dk;ZØe osQ ckjs esa tkudkjh ns jgh gSA

                          buiqV( ) LVsVesaV (The Input() Statement)
                      bl LVsVesaV dk mi;ksx çksxzke osQ fu"iknu osQ nkSjku mi;ksxdrkZ ls buiqV ysus osQ fy, fd;k tkrk gSA buiqV LVsVesaV
                      mi;ksxdrkZ vkSj oaQI;wVj osQ chp lans'k lapkjd osQ :i esa dk;Z djrk gSA

                      lkekU; okD;foU;kl gS%
                      flaVSDl        buiqV ("çkWEIV")] ;gk¡ çkWEIV dksM ls lacaf/r mi;ksxdrkZ osQ fy, ,d lans'k gSA

                      mnkgj.k       X = input ("What is your name?" )
                      bl mnkgj.k esa buiqV LVsVesaV izkWEIV "What is your name?" dk mi;ksx mi;ksxdrkZ ls buiqV çkIr djus vkSj bls
                      osfj,cy X dks vlkbu djus osQ fy, djsxkA

                      buiqV LVsVesaV ls yh xbZ oSY;w ,d fLVªax oSY;w gSA vkxs dh x.kuk osQ fy, bl oSY;w dks ,d iw.kk±d ;k ÝyksV esa cnyus
                      osQ fy,] fuEufyf•r dk;ks± dk mi;ksx djsa%
                         iaQD'ku                      o.kZu                                      mnkgj.k

                       Int ( )    int ( ) iaQD'ku ,d ÝyksV ;k fLVªax osfj,cy dks   int (x) osfj,cy x dks ,d iw.kk±d esa ifjo£rr
                                  int MsVk Vkbi esa ifjo£rr djrk gS             djrk gS

                       float ( )  float ( ) iaQD'ku ,d fLVªax ;k int osfj,cy dks   float (x) osfj,cy a dks ÝyksfVax ikWbaV uacj esa
                                  ,d ÝyksV MsVk Vkbi esa ifjo£rr djrk gS        cnyrk gSA

                          fizaV( ) LVsVesaV (The Print() Statement)
                      print ( ) LVsVesaV dk mi;ksx LØhu ij çksxzke osQ vkmViqV dks fçaV djus osQ fy, fd;k tkrk gSA lkekU; flaVSDVl gS%

                      flaVSDl       print (“message” , variable _ name)
                      mnkgj.k       print ("Area of the square is", area)

                         86  Play (Ver. 1.0)-VIII

| 83 84 85 86 87 88 89 90 91 92 93 |