![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
文章平均质量分 73
劳我以生
这个作者很懒,什么都没留下…
展开
-
【Python】STEP 4
十二、1.类实例化代码class Computer: screen = True def start(self): print('电脑正在开机中……')my_computer = Computer()print(type(my_computer))print(my_computer)print(my_computer.screen)my_computer.start()终端显示bash:baeb3c75-9bc4-1e20-6998-9ab0df47原创 2022-02-23 17:31:50 · 515 阅读 · 0 评论 -
【Python】STEP 3
目录七、random模块1.random.random()2.random.uniform(a,b)3.random.randint(a,b)4.random.randrange([start],stop[,step])5.random.choice()6.random.shuffle(x[,random])7.random.sample(sequence,k)八、九、1.函数定义2.print()函数的实际参数十、math模块1.向上取整 ceil()2.四舍五入 round()3.向下取整 floor(原创 2022-01-26 15:05:50 · 134 阅读 · 0 评论