自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(102)
  • 收藏
  • 关注

原创 2020.2.1

# text 9-9class Car(): def __init__(self,make,model,year): self.make = make self.model = model self.year = year self.odometer_reading = 0 def ge...

2020-02-01 19:22:35 48

原创 2020.1.27

# test 9-7 (3)class User(): def __init__(self , first_name , last_name , number , address , Email): self.first = first_name self.last = last_name self.number = number ...

2020-01-27 21:32:43 70

原创 2020.1.21

# test 9-7 (2)class User(): def __init__(self , first_name , last_name , number , address , Email): self.first = first_name self.last = last_name self.number = number ...

2020-01-21 10:40:11 48

原创 2020.1.20

# text 9-8class Admin(User): def __init__(self,first_name,last_name,number,address,Email): super().__init__(first_name,last_name,number,address,Email) self.privileges = ('ca...

2020-01-20 17:36:04 43

原创 2019.1.18

# test 9-7class User(): def __init__(self , first_name , last_name , number , address , Email): self.first = first_name self.last = last_name self.number = number ...

2020-01-18 10:15:39 54

原创 2020.1.17

# test 9-6 (3)class Restaurant(): def __init__(self , restaurant_name , cuisine_type): self.name = restaurant_name self.type = cuisine_type self.number_served = 0 ...

2020-01-17 09:36:10 66

原创 2020.1.16

# test 9-6 (2)class Restaurant(): def __init__(self , restaurant_name , cuisine_type): self.name = restaurant_name self.type = cuisine_type self.number_served = 0 ...

2020-01-16 17:08:12 30

原创 2020.1.15

# test 9-6class Restaurant(): def __init__(self , restaurant_name , cuisine_type): self.name = restaurant_name self.type = cuisine_type self.number_served = 0 ...

2020-01-15 10:04:54 29

原创 2020.1.14

104.class Car(): def __init__(self , make , model ,year): self.make = make self.model = model self.year = year self.odometer_reading = 0 def get_des...

2020-01-14 08:54:26 50

原创 2020.1.13

103.class Car(): def __init__(self , make , model , year): self.make = make self.model = model self.year = year self.odometer_reading = 0 def get_desc...

2020-01-13 09:23:15 160

原创 2020.1.12

102.(2)class Car(): def __init__(self , make , model , year): self.make = make self.model = model self.year = year self.odometer_reading = 0 def ...

2020-01-12 09:13:35 101

原创 2020.1.11

102.class Car(): def __init__(self , make , model , year): self.make = make self.model = model self.year = year self.odometer_reading = 0 def get_desc...

2020-01-11 09:09:57 64

原创 2020.1.10

# test 9-5class User(): def __init__(self , first_name , last_name , number , address , Email): self.first = first_name self.last = last_name self.number = number ...

2020-01-10 17:25:38 42

原创 2020.1.8

# test 9-4class Restaurant(): def __init__(self , restaurant_name , cuisine_type): self.name = restaurant_name self.type = cuisine_type self.number_served = 0 ...

2020-01-08 10:33:10 18

原创 2020.1.6

101.class Car(): def __init__(self , make , model , year): self.make = make self.model = model self.year = year self.odometer_reading = 0 def get_descript...

2020-01-06 09:16:21 25

原创 2019.1.4

100.class Car(): # 创建一个car类 """一次模拟汽车的简单尝试""" def __init__(self , make , model , year): # 创建一个__init__方法 """初始化描述汽车的属性""" # 把方法中属性储存在根据这个类创建的属性中 self.mak...

2020-01-04 15:18:44 28

原创 2020.1.2

# text9-3class user(): def __init__(self , first_name , last_name , adress, tel , email): self.first = first_name self.last = last_name self.adress = adress self....

2020-01-02 09:11:11 79

原创 2020.1.1

# text9-3class user(): def __init__(self , first_name , last_name , adress, tel , email): self.first = first_name self.last = last_name self.adress = adress self....

2020-01-01 22:59:29 67

原创 2019.12.31

# text9-1 , 9-2class Restaurant(): def __init__(self , restaurant_name , cuisine_type): self.name = restaurant_name self.type = cuisine_type def describe_restaurant(s...

2019-12-31 09:22:03 25

原创 2019.12.30

99.class Dog(): # 用class创建Dog类 """一次模拟小狗的简单尝试""" def __init__(self , name , age): # 建立一个方法__init__() """初始化属性name和age""" self.name = name # 形参self必不可少 ...

2019-12-30 12:24:09 22

原创 2019.12.29

98.class Dog(): # 用class创建Dog类 """一次模拟小狗的简单尝试""" def __init__(self , name , age): # 建立一个方法__init__() """初始化属性name和age""" self.name = name # 形参self必不可少 ...

2019-12-29 09:46:59 13

原创 2019.12.28

# 8-16"""pizza.py"""def make_pizza(size , *topping): print("\nMaking a " + str(size) + "-inch pizza with the following toppings:") for topping in toppings: print("- " + to...

2019-12-28 10:28:29 13

原创 2019.12.27

# test8-15"""printing_models.py"""def print_models(unprinted_designs , completed_models): while unprinted_designs: current_design = unprinted_designs.pop() print("Printing model...

2019-12-27 07:01:18 19

原创 2019.12.26

97.# 创建一个pizza.py的模块def make_pizza(size, *toppings): print("\nMaking a " + str(size) + "-inch pizza with the following toppings:") for topping in toppings: print("-" + topp...

2019-12-26 09:22:07 26

原创 2019.12.25

96.def a(b , c , **d): h = {} # 建立一个集合 h['m'] = b # 创建集合中的元素 h['n'] = c for key , value in d.items(): h[key] = value return h # 返回调取h储存在...

2019-12-25 08:45:02 20

原创 2019.12.24

95.def a(b , *c): # 定义一个函数,里面包含一个任意数量喝空元组形参 print("\n@@@@@@@ " + str(b) + " %%%%%%%%%%%%%%%%%%%%%%%%%:") for d in c: # 用for循环变...

2019-12-24 09:01:08 52

原创 2019.12.23

94.(2)# 或def a(*b): # 创建一个空元组 print("@@@@@@@@@@@:") for c in b: print("- " + c) a('x') a('x1', 'y1' , 'zz' , 'z2') # 调用函数

2019-12-23 09:06:52 20

原创 20198.12.22

94.def a(*b): # 创建一个空元组 print(b) a('x')a('x1' , 'x2' , 'y' , 'zz') # 调用函数

2019-12-22 17:01:54 16

原创 2019.12.20

93.(2)# 或def a(b, c): while b: d = b.pop() print("@@@@@@@@@@:" + d.title() + "!") c.append(d) def f(c): print("__________:" ) for g in c: print(g...

2019-12-20 09:15:53 21

原创 2019.12.19

93.def a(b, c): while b: d = b.pop() print("---------:" + d.title() + "!") c.append(d) print("@@@@@@@@@:" ) for e in c: print(e) b = ['x'...

2019-12-19 10:05:44 18

原创 2019.12.18

92.a = ['b ' , 'c' , 'd' , 'e'] # 创建一个列表ax = [] # 创建一个空列表while a: # 用while循环a列表 g = a.pop() # 使用变量g,并赋值等于删除a里表中的元素 p...

2019-12-18 09:10:58 21

原创 2019.12.17

91.def a(b): # 定义一个列表a, 并将形参b储存在列表a中 for c in b: # 用一个for循环 d = "hello " + c.title() + "!" print(d) e = ['x' , 'y' , 'z'] # 定义一个列表a(e) ...

2019-12-17 17:06:33 55

原创 2019.12.16

90.(2)def make_album(singer , name , number): full_make_album = {'歌手名' : singer , '专辑名' : name } if number: full_make_album['专辑歌曲数量'] = number return full_make_albumwhile Tru...

2019-12-16 09:27:47 19

原创 2019.12.15

90. def a(b , c): # 定义一个函数a,设置形参 x = b + " @@@ " + c # 设置一个变量x, return x.title() #返回值while True: # 做一个while循环 print("\nPlease tell me your na...

2019-12-15 09:42:57 18

原创 2019.12.14

89.def a(b , c , d = ''): # 定义一个函数a,里面有个形参是空字符串 x = {'f' : b , 'e' : c} # 设置变量x ,并把字典储存x中 if d: # 设定一个条件,如果调用函数包含d,那就调用这个形参值 x['d'] = d ...

2019-12-14 09:41:42 18

原创 2019.12.13

88.def a(b , c): # 定义一个函数a x = {'d' : b , 'g' :c} # 设置变量x,把字典储存在变量x中 return x # 把变量x设置为返回值y = a('h' , 'j') # 给函数a一组实参,用于替代替代形参print(y)...

2019-12-13 10:17:25 20

原创 2019.12.12

87.def a(b , c , d = ""): # 定义一个函数a,包含3个形参 if d: # 用if引导条件,当字符串为Ture时,执行条件函数 x = b + " " + d + " " + c # 设置变量x,并存储形参信息 else: ...

2019-12-12 09:04:10 16

原创 2019.12.11

86.(2)def a(b , c , d): # 定义一个函数,包含3个形参 x = b + " " + c + " " + d # 设置一个变量x,并储存形参信息 return x.title() # 把变量x返回值y = a('bb' , 'cc' , 'dd') # 把函数a储存在变量Y里prin...

2019-12-11 22:24:28 20

原创 2019.12.10

86.def a(b , c): # 定义一个函数a,包含2个形参 x = b + " " + c # 设置一个变量x,把形参信息储存在x当中 return x.title() # 把变量x首字母大写,并设置为返回值y = a('bb' , 'cc') # 把函数a储存在变量y里print(y) # 打印...

2019-12-10 09:12:48 38

原创 2019.12.9

85.def a(b , c = 'dog'): # 可以将形参的默认值设为具体值 print("\nI have a " + c + ".") print("My " + c + "'s name is " + b.title() + ".") a(b = 'willie') # 在没指定第二个形参的名称和值时,python会执...

2019-12-09 08:58:56 14

空空如也

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人 TA的粉丝

提示
确定要删除当前文章?
取消 删除