day006
0.1 determine the syntax
Single-branch structure
if conditions are true output
Two-branch structure
if conditions are true output
else output condition is not satisfied
Multi-branch structure
if
elif (unlimited write)
elif (no limit written) conditions are met Output
elif (no limit written)
else
= Score (20 is)
IF Score> = 90:
Print ( 'excellent')
elif Score> = 80:
Print ( 'good')
elif Score> = 70:
Print ( 'Normal')
the else: #OR elif Score <70:
print ( 'difference')
for i in range(1,13):
for j in range(1,32):
if i in[4,6,9,10,11] and j>30:
continue
'''if i<8and i % 2 == 0 and j>30:
continue
if i>7and i%2==1 and j>30:
continue'''
if i==2 and j>28:
continue
print(f'{i}月{j}日 运动')
range (1,10) # turn digital output 1,2,3, ......, 8,9
for i in range(1,13):
for j in range(1,32):
if i in[4,6,9,10,11] and j>30:
continue
'''if i<8and i % 2 == 0 and j>30:
continue
if i>7and i%2==1 and j>30:
continue'''
if i==2 and j>28:
continue
print(f'{i}月{j}日 运动')
02 reptiles
Reptiles and the three-part song:
1. Send request 2. Parse the data 3. Save the data
The essence of reptiles
1. Analysis of website communication process
2. The data come from analysis to find super
3. Analysis of pocketing strategic objectives websites
4. Write attacks pocketing strategy based on the destination site, access data
json
It is a type of third-party data
json.dumps () # python converting data format to the data format json
json.loads (). # json converts the data format into a data format python
User-Agent
One kind of pocketing strategy to determine whether it is through the User-Agent browser