zoukankan      html  css  js  c++  java
  • Day1:The basic of Python

    ------------恢复内容开始------------

    ------------恢复内容开始------------

    一、The development of Python

         1、Two types of program:

             Type 1:Python,Java,PHP,C#,Go,ruby,C++…… >>>byte code

             Type 2: C,assembler  >>>machine code

          2、Comparison between the frequencyly used language

              PHP: suitable for website,have limitations

              Python,Java: be suitable for website and background program

                   ---Python :high execution,low development 

                   ---Java :high development,low execution

               Cause Python is more easier to compile than Java

     二、The type of Python

           Jpython,Ironpython,CPython(commonly used),JavaScript Python,Rubypython

           Pypy:developed by Cpython

    三、The basic use of Python

          1、the suffix:

              The suffix is not limited but if without  '.py'  will lead some failure.  

          2、Two executive method:

              (1)、.py route 

            (2)、In the explain device :insert real time and get the real implement results

          3、explain the device route: #!/use/bin/env Python

          4、Python 2 coding: # -*- coding:utf8 -*-

              Eg:AscII 8bits(not enough)  unicode 16bits(a waste of bits); 

              Utf-8 :Can distribute the bytes according to the situation      

          5、execute an operation

               Print: wait until input value and then replace the values

               1) Remind the user input username and password

               2) Insert the username and password

               3)Check

               4)correct:log in;wrong:log failure

          6、Variable :word+number+underline

               1) number can't be the head and don't conclude key words such as:'as','and','from','except','for','exec','del'…

               2) quotation marks:"";'':must be a pair

               3) The algorithm of string: plus and multiple

               Supplement : the algorithm of number:+、_、*、/、%、** 、//

          7、if sentence 

              1) Compared with C :①the strict use of TAB key.②no use of() and {}in some cases

              2) if elif elif else

              3) the use of pass

          8、while sentence

              1) dead circulation :while 1==1

              2) conditional while

          Supplement:

              1) while else

              2) Continue: terminate the current circle and start the next round

                  Break:terminate the whole circle

    ------------恢复内容结束------------

    ------------恢复内容结束------------

  • 相关阅读:
    [arXiv18]更快的基于非二叉化自底向上策略的转移系统成分句法分析
    [AAAI18]面向序列建模的元多任务学习
    [COLING18]两种成分句法分析的局部特征模型
    [ACL18]基于RNN和动态规划的线性时间成分句法分析
    成分句法分析综述
    [NAACL16]RNN文法
    [TACL17]基于中序转移的成分句法分析
    K-摇臂赌博机算法与实现
    关于JVM案例分析(四)
    关于JVM案例分析(三)
  • 原文地址:https://www.cnblogs.com/zxver/p/11924555.html
Copyright © 2011-2022 走看看