Re-learn Python-day 01-python Basics-Python version selection + first small program

Source: Internet
Author: User

Off Topic:

Python version: Latest 3.6

Installation Note: Tick add path to customize the first level of installation to the hard drive directory, such as my installation path: F:\Python

Cause: You can automatically add Python environment variables, automatically associate. py files, the rest of the advantages are many, such as learning Selenium, using the PIP install Selenium command to install Selenium 3, although Python Webdriver Automation is still 2.7, but 3.0 will be the future.

Gossip later, and now formally began to learn Python, no way, not programming test in the work of delicious, learn not python, do not play dota2!!

the customary first Python applet

1 Print (" can't learn python, don't play dota2!!  2 Learn not to Python, not to play dota2!!  3print("Hello python! " )4 Hello python!

Ps:python running the compiler from the Python installation package of the Idle

variables

1. What you see is what you get, all things are objects, examples are:

>>> x = 7>>> y = 8>>> z = x * y"python">>> c = x * b Print (""=  Print (c) Pythonpythonpythonpythonpythonpythonpython Print (z*a)

Variables: With my vulgar understanding that the data is in memory, the variable name is the tag of the data in memory, and when we call it, we use the variable name to tell the program which data in memory we want to use.

>>> a =7>>> ID (a)497050016>>> a = 9>>> ID (9)497050080

The ID () is a python built-in function that looks at the location of the data in memory, A is a variable, marks and stores data, and when called a in the run, the program knows the data marked in memory using a.

2. Definition of the variable name command rule:

# underline Delimited

user Input

Input: All data accepted will be enforced as string processing

user_name = input ("pls input your name:"= input ("pls input your age:
    "= += default_age- int (user_age)print(type (last_age))  Print("%s has the last%d Yesrs"% (user_name,last_age))

The above code involves the concept of formatted output and continues to learn

Re-learn Python-day 01-python Basics-Python version selection + first small program

Related Article

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.