摘要: import math import numpy as np import pandas as pd from pandas import DataFrame y =[0.14 ,0.64 ,0.28 ,0.33 ,0.12 ,0.03 ,0.02 ,0.11 ,0.08 ] x1 =[0.29 , 阅读全文
posted @ 2022-03-19 17:19 兴奋的雪鹰 阅读(52) 评论(0) 推荐(0)
摘要: #创建数据库 import pymysql db =pymysql.connect(host='localhost',user='root',password='L3918374',database="xinji_inf",charset='utf8') #使用cursor()方法创建一个游标对象 阅读全文
posted @ 2021-12-11 18:29 兴奋的雪鹰 阅读(112) 评论(4) 推荐(0)
摘要: 1 class Pelope: 2 def xinxi(self,year,name): 3 print(name+ "," +year+ "岁,男,上山去砍柴") 4 print(name+ "," +year+ "岁,男,开车去东北") 5 print(name+ "," +year+ "岁,男 阅读全文
posted @ 2021-11-29 20:58 兴奋的雪鹰 阅读(32) 评论(0) 推荐(0)
摘要: 1 import random 2 def sinCircleGames(n,score,team): 3 '''模拟循环比赛 4 队伍赢得比赛加一分''' 5 for i in range(n): 6 for j in range(i,n): #从第1个队伍依次与每一个队伍打比赛 7 if i = 阅读全文
posted @ 2021-11-14 11:31 兴奋的雪鹰 阅读(62) 评论(0) 推荐(0)
摘要: 1 import jieba 2 txt = open("D:\作业\python 作业\jieba分词\红楼梦.txt","r",encoding = 'ansi').read() 3 words = jieba.lcut(txt) #精确模式进行分词 4 count = {} #创建空字典 5 阅读全文
posted @ 2021-11-13 20:32 兴奋的雪鹰 阅读(319) 评论(0) 推荐(0)
摘要: import turtle, datetimedef drawGap(): # 绘制数码管间隔 turtle.penup() turtle.fd(5) def drawLine(draw): # 绘制单段数码管 drawGap() turtle.pendown() if draw else turt 阅读全文
posted @ 2021-10-24 01:08 兴奋的雪鹰 阅读(193) 评论(0) 推荐(0)
摘要: 超市抹零结账 money_all = 56.75 + 72.91 + 88.50 + 26.37 + 68.51money_all_str = str(money_all)print("商品总金额为:"+money_all_str)money_real = int(money_all)money_r 阅读全文
posted @ 2021-09-15 18:58 兴奋的雪鹰 阅读(16) 评论(0) 推荐(0)
摘要: 结果 阅读全文
posted @ 2021-09-12 10:20 兴奋的雪鹰 阅读(75) 评论(0) 推荐(0)
摘要: 第一个星期刚接触Python,老师也讲了许多关于Python和编程的网站感觉很有用。在大一学习过C语言,这学期学习了Python是一门与C语言相关的语言。我在看书的时候也发现他与C语言是有一些区别的,Python比C语言要方便简洁,在使用变量前并不需要声明变量的类型,但有时仍然需要用到类型转换。Py 阅读全文
posted @ 2021-09-05 19:09 兴奋的雪鹰 阅读(146) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2021-09-05 18:12 兴奋的雪鹰 阅读(88) 评论(0) 推荐(0)