Python Development Second article

Source: Internet
Author: User

1. First procedure:

#-*-coding:utf-8-*-print ("Hello word")

1.1 Parsing:

(1) The meaning of the first line is to tell the Python interpreter to use Utf-8 's code to explain it at compile time.

(2) The second line is to print out "Hello word".

1.2 Then how to execute this procedure?

(1) Open the notebook, save the above code to the. py suffix file, and then open cmd, enter "path to Python file" in the Black window, carriage return ... Finished running.

2. Variables

What is a variable? Let's start by looking at a simple procedure:

#-*-coding:utf-8-*-name= "Jk" Print ("I am", name)

This program runs output: I am Jk

Magic not, "" "" "" "" "" "" "".

Name is a variable. Name= "JK" means defining a variable named name and assigning it a value of "JK".

2.1 Variable name?

Can the variable name be randomly beaten? That's definitely not going to work. Variable names are only letters, numbers, and underscores.

Python Development Second article

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.