One note per day ---- beginner python, note ---- beginner python
When I first came into contact with python, I also wanted to make it easier to understand this language. Remember it every day!
I will not talk about python in a mess here. For more information on the Internet, let's start with writing the first python code.
First, I believe that the first time I came into contact with a programming language, the teacher taught us how to use this language to write: Hello World. I followed some tutorials on the Internet, and the first python code I wrote was hello world.
The Code is as follows:
> Print ("Hello World ")
At that time, I executed the statement in Linux, and then output the result:
> Hello World
If you think it is quite simple, continue learning. Of course, later I learned how to use pycharm to write code. (You can find the installation packages of pycharm and python on the Internet. Of course, you can also leave a message. I will share it with you)
The next method to continue learning is input, input, and output. The Code is as follows:
Name = input ("name :")
Passwd = input ("passwd :")
Execution result:
Name:
After entering the name, the system will continue to prompt the input passwd:. Of course, only the input is required. If there is no output, the output will be added:
Name = input ("name :")
Passwd = input ("passwd :")
Print (name, passwd)
At this time, the user name and password we entered will be printed out.
Notes:
1. in python, the statement is not followed by symbols. Of course, I did not add it when I learned it today. I learned it later and then supplemented it.
2. print () can contain multiple parameters separated by commas.
Learn one thing every day. You are welcome to discuss it together.