JS¼¼Êõ

Áã»ù´¡ÈëÃÅѧϰPython£¨10£©£ºº¯Êý - qq_33256568µÄ²©¿Í - ²©¿ÍƵµÀ - CSDN.NET qq_3

×ÖºÅ+ ×÷ÕߣºH5Ö®¼Ò À´Ô´£ºH5Ö®¼Ò 2015-12-15 09:04 ÎÒÒªÆÀÂÛ( )

¶ÔÓÚCÓïÑԵIJÎÊý´«µÝ¶¼ÊÇÖµ´«µÝ£¬µ±´«µÝÒ»¸öÖ¸Õë¸øº¯ÊýµÄʱ£¬ÆäʵÖÊÉÏ»¹ÊÇÖµ´«µÝ£¬³ý·ÇʹÓÃË«Ö¸Õë¡£void swap ( int *a, int *b ){ int c; c = *a; *a = *b; *b

Áã»ù´¡ÈëÃÅѧϰPython£¨10£©£ºº¯Êý

¼òµ¥µÄº¯Êý½éÉÜ

: #²»´ø²ÎÊýµÄ¼òµ¥º¯Êý print('ÕâÊÇÎÒ´´½¨µÄµÚÒ»¸öº¯Êý£¡') >>> myFirstFunc() #º¯Êýµ÷Óà ÕâÊÇÎÒ´´½¨µÄµÚÒ»¸öº¯Êý£¡ : #´«ÈëÒ»¸ö×Ö·û´®name,nameÊÇÐβΠprint("My name is " + name) #ʹÓÃÁË×Ö·û´®Æ´½Ó >>> mySecondFunc("Jessica") #"Jessics"ÊÇʵ²Î£¬µ÷ÓôøÐβεĺ¯ÊýʱҪдÈëʵ²Î My name is Jessica : (x+y) >>> result = myThirdFunc(1,2) #¿ÉÒÔ°Ñ·µ»ØÖµ¸³¸øÒ»¸ö±äÁ¿ >>> result

º¯Êý²ÎÊýÓÐÒÔϼ¸ÖÖÇé¿ö
1¡¢¹Ø¼ü×Ö²ÎÊý£¬¼´±äÁ¿Ãû

: print("The name of the " + pet+ " is " + name) >>> test1("dog", "LittleSeven") The name of the dog is LittleSeven >>> test1("LittleSeven", "dog") #²ÎÊýÊÇ°´Õչؼü×Ö˳Ðò´«µÝµÄ The name of the LittleSeven is dog >>> test1(name = "LittleSeven", pet = "dog") #¿ÉÒÔд³öÐβÎÃûÈ»ºó¸³Öµ The name of the dog is LittleSeven

2¡¢Ä¬ÈϲÎÊý

,name = "LittleSeven"): print("The name of the " + pet+ " is " + name) >>> test2() #ÓÐĬÈϲÎÊýʱ£¬¿ÉÒÔ²»Ð´³ö²ÎÊýÖ±½Óµ÷Óà The name of the dog is LittleSeven >>> test2("cat","maomi") #Ò²¿ÉÒÔÖ±½Ó´«Èëʵ²Î£¬´Ëʱ»á¸²¸ÇĬÈϲÎÊý The name of the cat is maomi

3¡¢ÊÕ¼¯²ÎÊý£º²ÎÊý¸öÊý¿É±ä

: #¸øÐβαäÁ¿ÃûÇ°¼ÓÒ»¸öÐǺţ¨*£©£¬¼´³ÉΪ¸öÊý¿É±äµÄÐβΠprint("The length of parameter is: " , len(params)) print("The first argument is: " , params[0]) >>> test3(2,3,"Hello",3.14) #²ÎÊý±»´ò°ü³ÉÔª×é The length of parameter is: 4 The first argument : #ÓÐÊÕ¼¯²ÎÊýÖ®ºó»¹¿ÉÒÔÓÐÆäËû²ÎÊý print("The length of parameter is: " , len(params)) print("The additive value is: " , addition) >>> test4(2,3,"Hello",3.14,addition = 7) #µ÷Óú¯Êýʱ£¬¹Ø¼ü×Ö²ÎÊý±ØÐëд³öÐβÎÃûÔÙ¸³Öµ£¬·ñÔò»á±»µ±×÷ÊÕ¼¯²ÎÊýµÄÒ»Ô±±»´ò°üµ½Ôª×éÖÐ The length of parameter is: 4 The additive value is: 7

×îºóÔÙ½éÉÜϺ¯ÊýµÄ·µ»ØÖµ£¬PythonÖк¯Êý¿ÉÒÔ·µ»Ø¶à¸öÖµ£¬Ä¬ÈÏÊÇ·µ»ØÔª×é

: return (2,3.14,"Jessica") #ÒÔÔª×éÐÎʽ·µ»Ø¶à¸ö²ÎÊý >>> s = back() >>> s (2, 3.14, 'Jessica')

Áã»ù´¡ÈëÃÅѧϰPython£¨9£©£ºÐòÁÐ

  • ÉÏһƪÁã»ù´¡ÈëÃÅѧϰPython£¨9£©£ºÐòÁÐ
  • ¶¥ 2 ²È 0

    ÎÒµÄͬÀàÎÄÕÂ

    ²ÂÄãÔÚÕÒ

    ²é¿´ÆÀÂÛ

    * ÒÔÉÏÓû§ÑÔÂÛÖ»´ú±íÆä¸öÈ˹۵㣬²»´ú±íCSDNÍøÕ¾µÄ¹Ûµã»òÁ¢³¡

    ¸öÈË×ÊÁÏ


    qq_33256568

  • ·ÃÎÊ£º351´Î
  • »ý·Ö£º165
  • µÈ¼¶£º

    »ý·Ö£º165

  • ÅÅÃû£ºÇ§ÀïÖ®Íâ
  • ÎÄÕÂËÑË÷

    ÎÄÕ·ÖÀà

  • PythonÁã»ù´¡(10)
  • C++ÈëÃÅ(2)
  • ÎÄÕ´浵

  • 2015Äê12ÔÂ(12)
  • ÔĶÁÅÅÐÐ

  • Áã»ù´¡ÈëÃÅѧϰPython£¨1£©(50)
  • Áã»ù´¡ÈëÃÅѧϰPython£¨2£©£º×Ö·û´®Êä³ö(47)
  • C++ÈëÃÅ£¨1£©¼òµ¥±äÁ¿ºÍÊý¾ÝÀàÐÍ(36)
  • Áã»ù´¡ÈëÃÅѧϰPython£¨8£©£º×Ö·û´®¸ñʽ»¯(33)
  • Áã»ù´¡ÈëÃÅѧϰPython£¨7£©£ºÔª×é(33)
  • Áã»ù´¡ÈëÃÅѧϰPython£¨5£©£ºÁбí(31)
  • Áã»ù´¡ÈëÃÅѧϰPython£¨4£©£º³£ÓòÙ×÷·û(28)
  • C++ÈëÃÅ£¨2£©£º²Ù×÷·ûºÍ¿ØÖƽṹ(28)
  • Áã»ù´¡ÈëÃÅѧϰPython£¨3£©£ºÊý¾ÝÀàÐÍ(27)
  • Áã»ù´¡ÈëÃÅѧϰPython£¨6£©£ºÁÐ±í£¨Ðø£©(12)
  • ÆÀÂÛÅÅÐÐ

  • Áã»ù´¡ÈëÃÅѧϰPython£¨2£©£º×Ö·û´®Êä³ö(2)
  • Áã»ù´¡ÈëÃÅѧϰPython£¨3£©£ºÊý¾ÝÀàÐÍ(2)
  • Áã»ù´¡ÈëÃÅѧϰPython£¨5£©£ºÁбí(2)
  • Áã»ù´¡ÈëÃÅѧϰPython£¨1£©(1)
  • Áã»ù´¡ÈëÃÅѧϰPython£¨9£©£ºÐòÁÐ(1)
  • Áã»ù´¡ÈëÃÅѧϰPython£¨8£©£º×Ö·û´®¸ñʽ»¯(1)
  • C++ÈëÃÅ£¨2£©£º²Ù×÷·ûºÍ¿ØÖƽṹ(1)
  • Áã»ù´¡ÈëÃÅѧϰPython£¨7£©£ºÔª×é(1)
  • Áã»ù´¡ÈëÃÅѧϰPython£¨6£©£ºÁÐ±í£¨Ðø£©(1)
  • Áã»ù´¡ÈëÃÅѧϰPython£¨4£©£º³£ÓòÙ×÷·û(1)
  • ¡¡

    1.±¾Õ¾×ñÑ­ÐÐÒµ¹æ·¶£¬ÈκÎתÔصĸå¼þ¶¼»áÃ÷È·±ê×¢×÷ÕߺÍÀ´Ô´£»2.±¾Õ¾µÄÔ­´´ÎÄÕ£¬ÇëתÔØʱÎñ±Ø×¢Ã÷ÎÄÕÂ×÷ÕߺÍÀ´Ô´£¬²»×ðÖØÔ­´´µÄÐÐΪÎÒÃǽ«×·¾¿ÔðÈΣ»3.×÷ÕßͶ¸å¿ÉÄܻᾭÎÒÃDZ༭Ð޸Ļò²¹³ä¡£

    Ïà¹ØÎÄÕÂ
    • ѧϰJavaScriptÖ®this,call,apply

      ѧϰJavaScript֮this,call,apply

      2016-01-28 20:45

    • Swift 2.0ѧϰ±Ê¼Ç£¨Day48£©¡ª¡ªÀàÐͼì²éÓëת»» - ¹Ø¶«Éý - ²©¿ÍƵµÀ - CSDN.NET ¹Ø¶«Éý iO

      Swift 2.0ѧϰ±Ê¼Ç£¨Day48£©¡ª¡ªÀàÐͼì²éÓëת»» - ¹Ø¶«Éý - ²©¿ÍƵµÀ

      2015-12-14 18:16

    • ÓÐȤµÄRuby-ѧϰ±Ê¼Ç1 - ÎÒ¿ÉÒÔ½ÓÊÜʧ°Ü£¬µ«ÎÒ²»ÄܽÓÊÜ·ÅÆú¡£--Âõ¿Ë¶û Çǵ¤ - ²©¿ÍƵµÀ - CSDN.NET

      ÓÐȤµÄRuby-ѧϰ±Ê¼Ç1 - ÎÒ¿ÉÒÔ½ÓÊÜʧ°Ü£¬µ«ÎÒ²»ÄܽÓÊÜ·ÅÆú¡£--Âõ¿Ë

      2015-12-14 17:17

    • ÊÖ°ÑÊÖÈëÃÅÉñ¾­ÍøÂçϵÁÐ(2)_74ÐдúÂëʵÏÖÊÖдÊý×Öʶ±ð - ÁúÐij¾ - ²©¿ÍƵµÀ - CSDN.NET ÁúÐij¾ Ŀ¼ÊÓ

      ÊÖ°ÑÊÖÈëÃÅÉñ¾­ÍøÂçϵÁÐ(2)_74ÐдúÂëʵÏÖÊÖдÊý×Öʶ±ð - ÁúÐij¾ - ²©

      2015-12-14 16:29

    ÍøÓѵãÆÀ
    õ