Starting today with Python's system learning begins writing essays hoping to help people who see them.
Preview:
1. Installation of Python2 and Python3 for multi-version coexistence
2, write code in Python language, require input user information: name, age, home address, and then print
3, the old boy's age is 63, asked to make a guess age of the game user input of the age is small hint: too small user input age is the hint: too big users guess the age is prompt: you get it
Python Introduction:
The founder of Python is Guido van Rossum (Guido van Rossum). During the Christmas of 1989, Guido began to write the Python language compiler. The name Python, from Guido's beloved TV show Monty Python's Flying Circus. He hoped that the new language, called Python, would fit his ideals: create a language that is all-powerful, easy to learn, easy to use, and extensible, between C and Shell. The latest programming language leaderboard Python ranked fourth.
Python is a language of interpretation.
Python Application areas:
Web full-stack development, network programming, crawler, cloud computing, artificial intelligence, automated operation and maintenance, financial analysis, scientific computing, game development and so on.
Python in the field of reptile dominance, in the cloud computing, artificial intelligence, automation operations are also in a leading position.
Python's current development:
Now python2.7 and python3.6 official now support, but python2.7 is only an excessive version, the future trend will be python3.6, so personal advice to learn Python can directly learn the python3.6 version. python2.7 exists because many companies in the industry are still using Python 2.7, the old project hundreds of thousands of or even millions of lines of code want to quickly upgrade to 3.0 is not easy, but everyone in the development of new projects will almost use 3.x.
Preview Answer:
1, after installation of python2.7 and python3.6. Rename the python copy under the installation directory.
Remember that replication renaming cannot be renamed directly . Otherwise you will get an error.
2 , Enter user information: Name, age, home address, and then print
1 #ask to enter user information: Name, age, home address, and then print2Name = input ("Name:");3Age = Input ("Age :");4Address = input ("Address:");5 6 Print("======egon info======");7 Print("Name:", Name,"Age :", Age,"Address:", address);8 Print("=====================");
Results:
3, Guess age game:
1 Print("guess age Game:")2age = Int (input ("Please guess the age of the old boy:"))3 whileAge! = 63 :4 5 ifAge < 63 :6 Print("too small")7 8 Else :9 Print("too Big")Ten Oneage = Int (input ("Please guess the age of the old boy:")) A Print("You get it")
Results:
Small Knowledge Points:
Bin () is used to turn decimal into binary. Exit () exits.
Note that there are not enough bits in front plus 0. Example: 00010100
Python Basics (1): First knowledge of Python