Python Face question Collection

Source: Internet
Author: User

First, the difference between python2x and python3x

1, python2x source clutter, high repetition rate, python3x source code beautiful concise and clear.

2, python2x default use Unicode encoding, only support English numeric special characters; python3x default UTF-8 encoding, support Chinese.

Second, operator

1, judge the following logical statements True,false.

1) 1 > 1 or 3 < 4 or 4 > 5 and 2 > 1 and 9 > 8 or 7 < 6

2) not 2 > 1 and 3 < 4 or 4 > 5 and 2 > 1 and 9 > 8 or 7 < 6

2. Find the values of the following logical statements.

1), 8 or 3 and 4 or 2 and 0 or 9 and 7

2), 0 or 2 and 3 and 4 or 6 and 0 or 3

3. What are the following results?

1), 6 or 2 > 1

2), 3 or 2 > 1

3), 0 or 5 < 4

4), 5 < 4 or 3

5), 2 > 1 or 6

6), 3 and 2 > 1

7), 0 and 3 > 1

8), 2 > 1 and 3

9), 3 > 1 and 0

10), 3 > 1 and 2 or 2 < 3 and 3 and 4 or 3 > 2

Basis of Judgment: (1) Priority of operation: Not>and>or

(2) for or, if one side is 0, the result is the other; if there is no 0, the left side. For and, if one side is 0, then O, or to the right if there is no 0.

Python Face question Collection

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.