自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 面向对象进阶_课后练习

class Car: def __init__(self,motor,chassis,seat,shell): self.motor = motor self.chassis =chassis self.seat =seat self.shell =shell def run(self): print(...

2020-01-13 20:44:10 208

原创 多态实例

class Man: def eat(self): print("饿了,吃饭!")class Chinese(Man): def eat(self): print('用筷子吃饭')class English(Man): def eat(self): print('用刀叉吃饭')class Indian(Man): ...

2020-01-11 13:04:49 157

原创 小练习

判断一个输入的数,是否是素数num = int(input('输入一个数字:'))list=[]for i in range(2,num-1): list.append(num%i)if 0 in list: print('不是素数')else:print('是素数')...

2020-01-10 11:27:33 145

原创 学习类与对象

这个东哥讲的真好!https://www.bilibili.com/video/av26478927class Cat: #属性 #当创建玩一个对象后,立马会自动调用 def __init__(self,newColor,newWeiba,newWeight): self.color = newColor self.weiba = new...

2020-01-09 22:09:11 94

原创 小练习,简单的录入系统V1.0

思路还是不清晰,很多重复代码,应该可以使用def。#获取要操作的数字names= ['111','222','333','444','555','666',]while True:#打印提示 print('*'*30) print('欢迎使用系统!') print('1:添加名字') print('2:删除名字') print('3:修改名字') ...

2020-01-09 17:16:39 187

原创 python课后练习(高琪400集第一季.第五章)

新手第7天记录输入3245,输出5432直接反向输出def sort_num(n): n1 = str(n) n2 = n1[::-1] print(n2)sort_num(3245)按大小顺数排列def sort_num(n): m = [] n2=str(n) for i in n2: m.append(i) m.sort...

2020-01-07 13:55:16 941 1

空空如也

空空如也

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

TA关注的人

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