Python Introduction
Application areas: Web Development, database programming, desktop GUI application development, science and numerical computing, education and teaching, Web application development, software development (control, management, testing, etc.), games and 3D images, game development, website construction, robotics and Space shuttle control, Python can be used on almost any occasion.
Version: Currently, Python has two versions, one is version 2.x, the other is 3.x, and these two versions are incompatible. This tutorial uses Python 3.4.1.
Python is cross-platform and can run on Windows, Macs, and various Linux/unix systems. Write a Python program on Windows and put it on Linux to run it.
Python is a scripting language that interprets execution without compiling.
Pythoninstallation
Official website https://www.python.org/downloads/Download the installation package, and then configure the environment variable, at the command prompt, when the Python version appears, the configuration succeeds.
The first Python program
In the interactive environment prompt >>>
, enter the code directly, press ENTER, you can immediately get the code execution results.
>>> 5+38
Python's computing power is very powerful, such as the number of such a large multiplication can also be calculated, if it is C #, definitely overflow error.
>>> 1234567890123456789*987654321123456712193263114007009987532398367625363
Let Python print out the specified text
>>> print ("I love Python") #print () displays some text in the Output window. I love Python
>>> Print (5+3) 8
>>> print (' Well water ' + ' river ') well Water River
>>>print ("I love python\n" *8) I love Pythoni love Pythoni love Pythoni love Pythoni love Pythoni love Pythoni Love Pythoni Love Python
In Python, you can't add two completely different things, such as numbers and text.
>>> print ("I love python\n" +8) Traceback (most recent call last): File "<stdin>", line 1, in <module& Gt Typeerror:can ' t convert ' int ' object to str implicitly
30 minutes a day to learn Python