Python Learning Path 2

Source: Internet
Author: User

Next dayI. Basic data Types1. Digital
    • Int (integer)
    • Long (length integer)
    • Float (float type)
    • Complex (plural)
2. Boolean value
    • 1 (true) or 0 (false) indication
3. String
    • String formatting
    • Move out of space
    • Segmentation
    • Length
    • Index
    • Slice
4. List
    • Create a list
    • List operations
5, meta-group
    • Creating tuples
6. Dictionaries
    • Create dictionary (unordered)
    • Dictionary operations
second, the Operation1. Arithmetic Operations

2. Comparison Operation

3. Assignment Operation

4. Logical Operation

5. Member Arithmetic

6. Identity Operation

7, bit arithmetic

8, Operation priority

Third, Circulation1. For Loop
For I in range:    print ("Loop:", i)
2. While Loop
Age = 33print ("-------guess the game-------\ n-------cannot exceed 5 times-------") Count = 0while Count < 5:    guest = int (Input ("Enter your guess:")) C3/>if guest = = Age:        print ("guessed right!")        Break    Elif Guest < age:        print ("Guess small!")    else:        print ("Guess big!")    Count + = 1else:    print ("Too hard to guess!")

  

Python Learning Path 2

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.