30 minutes a day to learn Python

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.