![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
小码王
kaka_zheng
cloud
展开
-
卡牌对决(2版)
目录1.基础版2.提高版1.基础版知识: 1.ramdom模块 random.randint(0,100) 2.字典 zidianList={‘key’:‘value’}dict = {'Name': 'Runoob', 'Age': 7, 'Class': 'First'} print ("dict['Name']...原创 2021-09-18 22:05:24 · 5833 阅读 · 0 评论 -
自定义一个函数,调用函数,在鼠标右键按下时,出现不同大小的红色五角星
importturtleastimportrandomt.speed(0)defstar(x,y):t.penup()t.goto(x,y)t.pendownt.color("red")t.begin_fill()a=random.randint(10,200)foriinrange(5):t.forward(a)t.right(144)t.e原创 2021-09-11 17:52:59 · 411 阅读 · 0 评论 -
模拟银行(作者在小码王中学习到的)
1.V.001小马银行:使用文件夹保存当前信息,有记录# 账户类class Account(): def __init__(self, name, password, balance, operation): self.name = name self.password = password self.balance = balance self.operation = operation print(sel原创 2021-09-12 21:04:09 · 386 阅读 · 0 评论