摘要: pi = 0 N = 100 for 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 @ 2020-12-14 19:59 锂加熔融的锌盐 阅读(89) 评论(0) 推荐(0)
摘要: #方法1 def kanchai(name, age, sex): print("%s,%s岁,%s,上山去砍柴" % (name, age, sex)) def qudongbei(name, age, sex): print("%s,%s岁,%s,开车去东北" % (name, age, sex 阅读全文
posted @ 2020-12-14 19:57 锂加熔融的锌盐 阅读(58) 评论(0) 推荐(0)
摘要: from pip._vendor import requests print('访问百度网站 获取Response对象') r = requests.get("http://www.baidu.com") x = 1 while x <= 20: print('第' + str(x) + '次的返回 阅读全文
posted @ 2020-12-14 19:05 锂加熔融的锌盐 阅读(86) 评论(0) 推荐(0)
摘要: from random import random def printIntro(): #打印程序介绍信息 print("乒乓球竞技分析") print("这个程序模拟两个队伍A和B乒乓球比赛") print("程序运行需要队伍A和队伍B的能力值(以0到1之间的小数表示)") def getInpu 阅读全文
posted @ 2020-11-22 22:02 锂加熔融的锌盐 阅读(120) 评论(0) 推荐(0)
摘要: import jieba txt = open("D:/下载/西游记.txt", "r", encoding='utf-8').read() words = jieba.lcut(txt) # 使用精确模式对文本进行分词 counts = {} # 通过键值对的形式存储词语及其出现的次数 for w 阅读全文
posted @ 2020-11-14 01:17 锂加熔融的锌盐 阅读(232) 评论(0) 推荐(0)
摘要: import time import turtle as tt # 绘制间隔 def drawGap(): tt.penup() tt.fd(5) # 绘制单段数码管 def drawLine(draw): drawGap() if (draw): tt.pendown() else: tt.pen 阅读全文
posted @ 2020-10-19 11:58 锂加熔融的锌盐 阅读(53) 评论(0) 推荐(0)
摘要: import turtle n = 60 x = -300 y = -300 def main(): turtle.speed(11) turtle.pensize(2) turtle.penup() for i in range(8): for j in range(8): turtle.goto 阅读全文
posted @ 2020-10-06 16:21 锂加熔融的锌盐 阅读(117) 评论(0) 推荐(0)
摘要: from turtle import * setup(800, 800, 100, 100) fillcolor('#FFFFFF') begin_fill() circle(100, 180) circle(200, 180) seth(180) circle(-100, 180) end_fil 阅读全文
posted @ 2020-10-06 16:18 锂加熔融的锌盐 阅读(89) 评论(0) 推荐(0)
摘要: turtle.color("red") turtle.penup() turtle.goto(coordA[0], coordB[0]) turtle.pendown() turtle.circle(45) turtle.color("blue") turtle.penup() turtle.got 阅读全文
posted @ 2020-10-06 16:16 锂加熔融的锌盐 阅读(184) 评论(0) 推荐(0)
摘要: import turtle number = int(input()) turtle.screensize(600,500,'white') turtle.pensize(3) turtle.pencolor('blue') turtle.fillcolor('yellow') turtle.beg 阅读全文
posted @ 2020-10-06 16:11 锂加熔融的锌盐 阅读(119) 评论(0) 推荐(0)