- 博客(4)
- 收藏
- 关注
原创 新手之统计词语频率
wordstring='''it was the best of times it was the worst of times. it was the age of wisdom it was the age of foolishness.'''wordstring=wordstring.replace('.','')#将.号用空格替换wordlist=wordstring.split()#按照空格将所有单词拆出,组成新列表wordreq=[]for w in word.
2021-06-09 14:10:12
263
原创 新手之猜拳游戏
# -*- codeing=utf-8 -*-# @Time:2021/6/7 20:45# @Author:Fei.xue# @File:XUEFEI.py# @software:PyCharmimport randomimport timem1 = m2 = 0 #m1是玩家得分,m2是电脑得分def sl(): time.sleep(1)def rule(): global x1,x2,l1,l2 while 1 != 2: x1 .
2021-06-09 13:51:48
93
原创 新手之九九乘法表
用for/while循环实现1*1=12*1=2 2*2=43*1=3 3*2=6 3*3=94*1=4 4*2=8 4*3=12 4*4=165*1=5 5*2=10 5*3=15 5*4=20 5*5=256*1=6 6*2=12 6*3=18 6*4=24 6*5=30 6*6=367*1=7 7*2=14 7*3=21 7*4=28 7*5=35 7*6=42 7*7=498*1=8 8*2=16 8*3=24 8*4=32 8*5=40 8*6=48 8*7=56 8*8=64
2021-06-09 10:03:47
882
原创 新手之购物车练习
程序:购物车程序需求:1.启动程序后,让用户输入工资,然后打印商品列表2.允许用户根据商品编号购买商品3.用户选择商品后,检索余额是否够,够就直接付款,不够就提醒4.可以随时退出,退出时,打印已购商品和余额...
2021-06-09 09:53:05
157
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人