摘要: jieba分词聊斋 import jieba txt = open("聊斋志异白话简写版.txt", "r", encoding='utf-8').read() words = jieba.lcut(txt) # 使用精确模式对文本进行分词 counts = {} # 通过键值对的形式存储词语及其出 阅读全文
posted @ 2021-12-16 12:58 林木森3 阅读(33) 评论(0) 推荐(0)
摘要: 模拟体育竞技-羽毛球 # -*- encoding:utf-8 -*- ''' 模拟羽毛球竞技 @author: bpf ''' from random import random from time import time def printInfo(): print("{:*^70}".form 阅读全文
posted @ 2021-12-16 12:58 林木森3 阅读(30) 评论(0) 推荐(0)
摘要: 1.13章实例01 球 import sys import pygame pygame.init() size=width,height=640,480 screen=pygame.display.set_mode(size) color=(0,0,0) ball=pygame.image.load 阅读全文
posted @ 2021-12-16 12:41 林木森3 阅读(50) 评论(0) 推荐(0)
摘要: 1.正则表达式的点星分配 import re str1=input() str2=input() if re.match(str2,str1): print("True") else: print("False") 2.梯形法计算积分值 import math a,b = map(eval,inpu 阅读全文
posted @ 2021-12-16 12:31 林木森3 阅读(162) 评论(0) 推荐(0)
摘要: 1.一元二次方程求根 import math a = eval(input()) b = eval(input()) c = eval(input()) delta = pow(b,2) - 4*a*c if a == 0: if b == 0: print('Data error!') else: 阅读全文
posted @ 2021-12-16 12:27 林木森3 阅读(241) 评论(0) 推荐(0)