Skip to content

Commit b1ba7c5

Browse files
committed
git commit
1 parent 32a16b2 commit b1ba7c5

2 files changed

Lines changed: 71 additions & 5 deletions

File tree

chapt 5/learn_if.py

Lines changed: 71 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,74 @@
11
# car='honda'
22
# car.title()
33
# print(car)
4-
values=(1,2,3,4,5,6,7,8,9,10)
5-
for value in values:
6-
if value<=8 and value not in range(5,100):
7-
print(value)
8-
4+
# values=(1,2,3,4,5,6,7,8,9,10)
5+
# for value in values:
6+
# if value<=8 and value not in range(5,100):
7+
# print(value)
8+
# alien_colors=['green','yellow','red']
9+
# alien_color='red'
10+
# if alien_color==alien_colors[0]:
11+
# print('You got five point !')
12+
# elif alien_color== alien_colors[1]:
13+
# print('You got ten point !')
14+
# elif alien_color== alien_colors[2]:
15+
# print('You got fifteen point !')
16+
# age = 57
17+
# if age<2:
18+
# print('baby')
19+
# elif age>=2 and age<4:
20+
# print('learning walking')
21+
# elif age>=4 and age<13:
22+
# print('child')
23+
# elif age>=13 and age<20:
24+
# print('teenager')
25+
# elif age>=20 and age<65:
26+
# print('adult')
27+
# elif age>=65 :
28+
# print('elder')
29+
# favorit_fruits=['apple','bananas','cherry']
30+
# list_fruits=('watermelon','strawberry','tomatow','apple','cherry')
31+
# for fruit in list_fruits:
32+
# if fruit in favorit_fruits:
33+
# print('You really like '+fruit+' !')
34+
# else:
35+
# print("I don't know the fruit !")
36+
list_admin=('caopan','caocao','daxia','Lbw','ZZ')
37+
# admin_name=''
38+
# if admin_name:
39+
# if admin_name in list_admin:
40+
# print("Hellow "+admin_name+" , would you like to see a status report ?")
41+
# else:
42+
# print("Hellow "+admin_name+" , thank you for logging in again !")
43+
# print("We need to find some users ! ")
44+
# new_names=['liuqiangdong','mayun','libai','Lbw','caocao']
45+
# current_names=[name.lower() for name in list_admin]
46+
# for new_name in new_names:
47+
# if new_name.lower() in current_names:
48+
# print(new_name +" have existed ! Please use another name .")
49+
# else:
50+
# print("OK ! You can use "+new_name+" as you logging name!")
51+
# values=[1,3,6,5,2,8,9,7,4]
52+
# for value in values:
53+
# if value==1:
54+
# print(str(value)+" is the 1st number !")
55+
# elif value==3:
56+
# print(str(value)+" is the 2nd number !")
57+
# elif value==6:
58+
# print(str(value)+" is the 3rd number !")
59+
# elif value==5:
60+
# print(str(value)+" is the 4th number !")
61+
# elif value==2:
62+
# print(str(value)+" is the 5th number !")
63+
# elif value==8:
64+
# print(str(value)+" is the 6th number !")
65+
# elif value==9:
66+
# print(str(value)+" is the 7th number !")
67+
# elif value==7:
68+
# print(str(value)+" is the 8th number !")
69+
# elif value==4:
70+
# print(str(value)+" is the 9th number !")
71+
72+
73+
74+

day01.py

Whitespace-only changes.

0 commit comments

Comments
 (0)