摘要: pi = 0N = 100for k in range(N): pi += 1/pow(16, k) * (4 / (8 * k + 1) - 2 /(8 * k + 4) - 1/(8 * k + 5) - 1 /(8 * k + 6)) print("圆周率值是:{}".format(pi)) 阅读全文
posted @ 2021-12-14 14:21 必杀技welllee 阅读(64) 评论(0) 推荐(0)
摘要: import turtle, datetimedef drawGap(): # 绘制数码管间隔 turtle.penup() turtle.fd(5) def drawLine(draw): # 绘制单段数码管 drawGap() turtle.pendown() if draw else turt 阅读全文
posted @ 2021-12-14 14:19 必杀技welllee 阅读(197) 评论(0) 推荐(0)
摘要: # -*- coding: utf-8 -*-"""Created on Tue Jun 9 11:18:48 2020 @author: 13549""" from random import random#第一阶段def printIntro(): print("模拟两个选手A和B的羽毛球比赛" 阅读全文
posted @ 2021-12-11 21:14 必杀技welllee 阅读(67) 评论(0) 推荐(0)
摘要: #! python3# -*- coding: utf-8 -*-import os, codecsimport jiebafrom collections import Counter def get_words(txt): seg_list = jieba.cut(txt) c = Counte 阅读全文
posted @ 2021-12-11 21:11 必杀技welllee 阅读(66) 评论(0) 推荐(0)
摘要: import os class Student(object): def __init__(self, sid, name, grade=None): self.sid = sid self.name = name self.grade = grade def __str__(self): retu 阅读全文
posted @ 2021-12-11 20:35 必杀技welllee 阅读(68) 评论(0) 推荐(0)
摘要: 03运行超市抹零结账行为 ‪‬‪‬‪‬‪‬‪‬‮‬‫‬‮‬‪‬‪‬‪‬‪‬‪‬‮‬‫‬‮‬‪‬‪‬‪‬‪‬‪‬‮‬‫‬‭‬‪‬‪‬‪‬‪‬‪‬‮‬‪‬‭‬‪‬‪‬‪‬‪‬‪‬‮‬‫‬‪‬‪‬‪‬‪‬‪‬‪‬‮‬‫‬‭‬ 04计算学生成绩的分差和平均分 ‪‬‪‬‪‬‪‬‪‬‮‬‫‬‮‬‪‬‪‬‪‬‪‬ 阅读全文
posted @ 2021-09-14 01:24 必杀技welllee 阅读(23) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2021-09-06 10:24 必杀技welllee 阅读(29) 评论(0) 推荐(0)
摘要: 这是我第一次接触Python,我感觉它跟c语言相比,它没有c语言那么的繁琐,比c语言跟简洁一些。因为现在是刚刚开始学习,我会觉得它会更有趣一些。在进行了一些实战训练之后,我感觉它也是不容易的,虽然比c语言简洁一些,但是它也是需要你动手实操的。总的来说,在我感觉来如果我自己足够熟悉键盘,在输入代码的时 阅读全文
posted @ 2021-09-06 10:23 必杀技welllee 阅读(37) 评论(0) 推荐(0)