摘要:
1 from random import random 2 from time import perf_counter 3 from tqdm import tqdm 4 import time 5 for i in tqdm(range(100)): 6 time.sleep(0.1) 7 pri 阅读全文
posted @ 2020-04-15 15:23
DG息
阅读(205)
评论(0)
推荐(0)
摘要:
运用jieba库统计词频,并对词频进行排序 1 import jieba 2 txt = open("文章.txt","r",encoding='gbk',errors='replace').read() 3 words = jieba.lcut(txt) 4 counts = {} 5 for w 阅读全文
posted @ 2020-04-15 15:19
DG息
阅读(309)
评论(0)
推荐(0)
摘要:
实现和线上汉诺塔移动问题 1 def hannuo(n,a,b,c): 2 if n == 1: 3 print(a,"->",c) 4 else: 5 hannuo(n-1,a,c,b)#将最后一个盘子移到c 6 print(a,"->",c)#将剩余的盘子移动c 7 hannuo(n-1,b,a 阅读全文
posted @ 2020-04-15 15:15
DG息
阅读(335)
评论(0)
推荐(0)
摘要:
一元二次方程求根 一元二次方程ax2+bx+c=0,a、b、c的值由用户在三行中输入,根据用户输入的数值求解方程的实数解: 阅读全文
posted @ 2020-04-15 01:14
DG息
阅读(6018)
评论(0)
推荐(0)


浙公网安备 33010602011771号