Two, the first program of Python

Source: Internet
Author: User

1. Command window into the Python installation directory

2.

>>> 100+200300

Quite simply, any valid mathematical calculation can be calculated.

If you want Python to print out the specified text, you can use a print statement, and then enclose the text you want to print in single or double quotes, but you can't mix single and double quotation marks:

Print ' Hello, World ' Hello, World

This text, enclosed in single or double quotation marks, is called a string in the program, and we will often encounter them in the future.

Finally, with the exit() exit Python, our first Python program is done! The only drawback is that it's not saved and you'll need to enter the code again the next time you run it.

Summary

Under the Python interactive command line, you can enter the code directly, then execute it, and get the results immediately.

Two, the first program of Python

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.