: which of the following variables is named incorrectly? Why?
(A) mm_520 (B) _mm520_ (C) 520_mm (D) _520_mm
C because the first character of a variable cannot be a number
: in the case of not being on the machine, the following code can you guess what the screen will print? 650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/58/72/wKioL1Sw_cny2gK_AAByHSpiZhU366.jpg "title=" Picture 5.png "alt=" wkiol1sw_cny2gk_aabyhspizhu366.jpg "/>
Little Turtle
: in the case of not on the machine, the following code can you guess what the screen will print?
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/58/76/wKiom1Sw_Q_BkET_AABtu3aja6U088.jpg "title=" Picture 6.png "alt=" Wkiom1sw_q_bket_aabtu3aja6u088.jpg "/>
'520'
£ º In addition to using the rice slash (\) for character escapes, what else can be printed: Let's go! this string?
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/58/72/wKioL1Sw_ezBxUWHAABiI-ymWNw916.jpg "title=" Picture 7.png "alt=" Wkiol1sw_ezbxuwhaabii-ymwnw916.jpg "/>
: If you want to enter a backslash at the end of the original string, how can you handle it flexibly?
>>> print ("Let's go!\\")
Let ' s go!\
>>>
At : Do you remember the first moving question we talked about? This time a variable is required to calculate how many seconds are in a year?
Tip: You can use Daysperyear (number of days per year), HoursPerDay (hours per day), Minutesperhour (minutes per hour), Secondsperminute (seconds per minute) as variable names.
>>> def time ():
daysperyear=365
Hoursperday=24
Minutesperhour=60
Secondsperminute=60
Result=daysperyear*hoursperday*minutesperhour*secondsperminute
Print (Result)
>>> time ()
31536000
>>>
: on the last mention of the long string (Sanchong quote string) in fact, in Python3 can also write this, may try, and then compare which is more convenient?
>>> str = "' If Life has no sunshine
The ideal shore will be far from us
Hope will never shine again
The longing and the pursuit of mankind have a barrier to the diaphragm.
If life has no sunshine
The human face will lose a brilliant smile.
Sweet Love will not be in the street fragrance
There's a lot of cold darkness around the human side.
If life really doesn't have the sun
Please don't hesitate.
Light a warm fire
The dawn of the joy of spreading
>>> Print (str)
If life has no sunshine
The ideal shore will be far from us
Hope will never shine again
The longing and the pursuit of mankind have a barrier to the diaphragm.
If life has no sunshine
The human face will lose a brilliant smile.
Sweet Love will not be in the street fragrance
There's a lot of cold darkness around the human side.
If life really doesn't have the sun
Please don't hesitate.
Light a warm fire
To spread the dawn of happiness
>>>
This article is from the "Make a few" blog, be sure to keep this source http://9399369.blog.51cto.com/9389369/1601662
Little Turtle after class, section 3rd