摘要: 1、Numpy NumPy(Numerical Python) 是 Python 语言的一个扩展程序库,支持大量的维度数组与矩阵运算,此外也针对数组运算提供大量的数学函数库。 NumPy 是一个运行速度非常快的数学库,主要用于数组计算,包含: 一个强大的N维数组对象 ndarray。 广播功能函数。 阅读全文
posted @ 2023-12-24 23:42 T1an- 阅读(16) 评论(0) 推荐(0)
摘要: 采用乒乓球比赛规则 ‪‬‪‬‪‬‪‬‪‬‮‬‫‬‪‬‪‬‪‬‪‬‪‬‪‬‮‬‭‬‫‬‪‬‪‬‪‬‪‬‪‬‮‬‫‬‭‬‪‬‪‬‪‬‪‬‪‬‮‬‫‬‫‬‪‬‪‬‪‬‪‬‪‬‮‬‫‬‫‬‪‬‪‬‪‬‪‬‪‬‮‬‭‬‪‬a.一局比赛:‪‬‪‬‪‬‪‬‪‬‮‬‫‬‪‬‪‬‪‬‪‬‪‬‪‬‮‬‭‬‫‬‪‬‪‬‪ 阅读全文
posted @ 2023-12-23 17:41 T1an- 阅读(36) 评论(0) 推荐(0)
摘要: import jieba txt = open("D:\python-learn\lianxi\聊斋志异.txt","r",encoding = 'utf-8').read() words = jieba.lcut(txt) counts = {} for word in words: if len 阅读全文
posted @ 2023-12-23 17:18 T1an- 阅读(7) 评论(0) 推荐(0)
摘要: import jieba txt = open("D:\python-learn\lianxi\聊斋志异.txt","r",encoding = 'utf-8').read() words = jieba.lcut(txt) counts = {} for word in words: if len 阅读全文
posted @ 2023-12-22 22:19 T1an- 阅读(8) 评论(0) 推荐(0)
摘要: import turtle, datetime def drawGap(): # 绘制数码管间隔 turtle.penup() turtle.fd(5) def drawLine(draw): # 绘制单段数码管 drawGap() turtle.pendown() if draw else tur 阅读全文
posted @ 2023-11-21 20:52 T1an- 阅读(20) 评论(0) 推荐(0)
摘要: π的计算 import random S = 1e6 N = 0 for i in range(int(S)): x = random.random() y = random.random() d = (x-0.5)**2+(y-0.5)**2 if d<=0.5**2: N+=1 else: pa 阅读全文
posted @ 2023-11-01 11:16 T1an- 阅读(21) 评论(0) 推荐(0)
摘要: 03超市结账抹零行为 num = float(input("您的结账金额为")) num1 = int(num) print(num1) print(3130) 04计算学生的分差和平均值 python=int(input()) english=int(input()) c=int(input()) 阅读全文
posted @ 2023-11-01 11:14 T1an- 阅读(15) 评论(0) 推荐(0)