Python Learning Diary (i)--idle, operators

Source: Internet
Author: User

Environment: win8.1+python2.7.8

First, the noun explanation:

1.IDLE: Regular programming students believe that the integrated development environment (Integrated development environment,ide) should be very familiar with, such as: Eclipse,visual studio and so on. While Idle is the basic IDE for developing Python programs (integrated development environment) with basic IDE functionality, a good choice for non-commercial python development. When the Python is installed, the idle is automatically installed, no need to find another. Frankly, Idle is an IDE instance that can develop Pythond.

Second, the basic knowledge

1.print "Hello, World"

Enter the following code at the interactive interpreter idle development environment prompt >>>

Print " Hello, World "

Enter, the interactive platform outputs Hello, world

It is important to note that here the "", when the double quotation marks are executed, the output is still the same. In some other languages, single and double quotes are strictly distinguishable. such as Java,c,...。 Why does Python not differentiate between single and double quotes?

Print " Monty python\ ' s Flying circus "

At this point, the result of the output: Monty Python s Flying Circus. It is very inconvenient to write with an escape character if the question contains a large number of single quotes, so you can omit

Print " Monty Python ' s Flying circus "

When you need to display double quotation marks, the outer single quotation marks are the same. In fact, the language is similar to the use of JavaScript and so on.

2. Operator, subtraction is ignored, the powers of the words in python with * * expression

Print -3**2

What's your answer? -6,6,-9,9 or something? Do the following. See if the precedence is high or-the priority is high.

Python Learning Diary (i)--idle, operators

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.