I first intimate contact and the python

Test questions:

0. What kind of language is Python?

  Python is a scripting language that can be written to run directly

  Python is an object-oriented, interpreted, dynamic type computer programming language 
       interpreted: the program need not be compiled into binary code, but a compilation of statements when performing a 
       dynamic type: during program execution, the type of the variable can be changed 
       it is often nicknamed glue language, the other language can make various modules (especially C / C ++) easily linked together

what 1. IDLE is?

  The program comes with a simple python integrated development environment

What 2. print () is the role?

  Print text output string

3. Python multiplication symbol representing what is?

  An asterisk *

4. Why >>> print ( 'I love fishc.com' * 5) can perform well, but >>> print ( 'I love fishc.com' + 5) but error?

  python two different types of data can not be summed

5. If I need to embed a double quotation mark in a string, the correct way is?

  After a backslash double quote \ called the escape character

6. Why should we use Python3? Python2 in the end what is the problem? It looks like a lot of programmers are still in use Python2?

  


Move hands:

0. hands to try direct input and input >>> 5 + 8 >>> print (5 + 8) What's the difference?

  >>> 5 + 8 no return result

  >>> print (5 + 8) returns the result: 18 


1. In the interactive mode, using the Python calculate how many seconds a year?

 >>>print(60*60*24*365)

 >>>31536000

  

Guess you like

Origin www.cnblogs.com/98ZHANG/p/11324798.html