Python 4.27

Source: Internet
Author: User

First, formatted output%

Text%s

Number%d

#name = input (' Please enter name: ')#age = Int (input (' Please enter Ages: '))#job = input (' Please enter job name: ')#Hobbie = input (' Please enter hobby: ')#msg = " '#------------Info of%s-----------#Name:%s#Age :%d#Job:%s#Hobbie:%s#-------------End-----------------#"% (Name,name,age,job,hobbie)#Print (msg)
formatted output

Second, operator

() > Not > and > or

Sibling words from left to right sequentially

is divided into two cases (both before and after the comparison, both front and back are numbers)

Third, while Else

The while loop ends with the else, and if a break is encountered, it jumps directly without executing else

#count = 1#While count <= 5:#print (count)#count = count + 1#Else: #循环结束走else#print (' Cycle finished ')#print (' I have the bottom line ')#count = 1#While count <= 5:#print (count)#count = count + 1#if Count = = 4:#Break #当count满足if条件时直接走下面break跳出, don't go else#Else:#print (' 1 ')
While else

Four, the first knowledge of coding
I. ASCII: Letters, numbers, special characters

A 8-bit consists of a byte that consists of one character.

Characters: the smallest unit that makes up the content

Second, universal code Unicode

16 bits, which are expressed in two bytes, such as Chinese characters, cannot be represented by a complete

Upgrade:

32 bits, all in 4 bytes, waste of resources

Upgrade:

Utf-8: Minimum 8 bits for one character

A: one byte (8 bits)

European text: two bytes (16 bits)

Asian text: Three bytes (24 bits)

UTF-16: Minimum 16 bits for one character

Third, GBK (national standard)

A: one byte (8 bits)

English: two bytes (16 bits)

Four, 8-bit 8bit= 1byte

1024bytes =1kb

1024KB = 1MB

1024MB = 1GB

1024GB = 1TB

Python 4.27

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.