One note per day ---- beginner python, note ---- beginner python

Source: Internet
Author: User

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.

 

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.