- 博客(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
220
原创 新手之猜拳游戏
# -*- codeing=utf-8 -*- # @Time:2021/6/7 20:45 # @Author:Fei.xue # @File:XUEFEI.py # @software:PyCharm import random import time m1 = 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
67
原创 新手之九九乘法表
用for/while循环实现 1*1=1 2*1=2 2*2=4 3*1=3 3*2=6 3*3=9 4*1=4 4*2=8 4*3=12 4*4=16 5*1=5 5*2=10 5*3=15 5*4=20 5*5=25 6*1=6 6*2=12 6*3=18 6*4=24 6*5=30 6*6=36 7*1=7 7*2=14 7*3=21 7*4=28 7*5=35 7*6=42 7*7=49 8*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
736
原创 新手之购物车练习
程序:购物车程序 需求: 1.启动程序后,让用户输入工资,然后打印商品列表 2.允许用户根据商品编号购买商品 3.用户选择商品后,检索余额是否够,够就直接付款,不够就提醒 4.可以随时退出,退出时,打印已购商品和余额 ...
2021-06-09 09:53:05
107
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人