摘要: Numpy Numpy 是 Python 中用于科学计算的核心库之一。它提供了强大的多维数组对象和各种用于处理数组的函数。Numpy 的主要功能包括对数组进行数学运算、数组索引和切片、线性代数运算、傅立叶变换等。这使得 Numpy 成为数据分析、机器学习和科学计算领域中不可或缺的工具。 Scipy 阅读全文
posted @ 2023-12-29 10:28 teshi1 阅读(10) 评论(0) 推荐(0)
摘要: from random import random # 打印程序介绍信息 def printIntro(): print("这是单人赛模拟程序:") # 获得程序运行参数 def getInputs(): a = eval(input("请输入选手A的能力值(0-1): ")) b = eval(i 阅读全文
posted @ 2023-12-29 10:25 teshi1 阅读(15) 评论(0) 推荐(0)
摘要: import pygame import sys import random import numpy as np class Bird(object): """定义一个鸟类""" def __init__(self): """定义初始化方法""" self.birdRect = pygame.Re 阅读全文
posted @ 2023-12-27 12:39 teshi1 阅读(10) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2023-12-27 12:36 teshi1 阅读(24) 评论(0) 推荐(0)
摘要: ```import jieba # 读取文本文件 path = "西游记.txt" file = open(path, "r", encoding="utf-8") text = file.read() file.close() # 使用jieba分词 words = jieba.lcut(text 阅读全文
posted @ 2023-12-27 12:31 teshi1 阅读(4) 评论(0) 推荐(0)
摘要: import requests url = 'https://www.baidu.com' for i in range(20): response = requests.get(url) print(f"第{i+1}次访问") print(f'Response status: {response. 阅读全文
posted @ 2023-12-19 22:58 teshi1 阅读(3) 评论(0) 推荐(0)
摘要: 03运行超市抹零结账行为 a=float(input("商品的价格:"))print("商品总金额:",int(a))print("学号后四位:3022") 运行结果: 04计算学生成绩的分差和平均分 A=96 B=92 C=88 D=A-C E=(A+B+C)/3 print("A科目和B科目的分 阅读全文
posted @ 2023-10-30 19:21 teshi1 阅读(14) 评论(0) 推荐(0)
点击右上角即可分享
微信分享提示