摘要: from pip._vendor import requests print('访问谷歌网站 获取Response对象') r = requests.get("http://www.google.cn") x = 1 while x <= 20: print('第' + str(x) + '次的返回 阅读全文
posted @ 2020-12-14 18:56 陈欢欢 阅读(49) 评论(0) 推荐(0)
摘要: NumPy篇 numpy.around() 函数返回指定数字的四舍五入值 numpy.floor() numpy.floor() 返回小于或者等于指定表达式的最大整数,即向下取整 numpy.ceil() numpy.ceil() 返回大于或者等于指定表达式的最小整数,即向上取整 numpy.rec 阅读全文
posted @ 2020-11-23 00:16 陈欢欢 阅读(64) 评论(0) 推荐(0)
摘要: from random import random def printIntro(): #打印程序介绍信息 print("13号陈欢欢进行比赛分析结果:") print("这个程序模拟两个队伍A和B的某种竞技比赛") print("程序运行需要队伍A和队伍B的能力值(以0到1之间的小数表示)") d 阅读全文
posted @ 2020-11-23 00:04 陈欢欢 阅读(38) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2020-11-14 17:20 陈欢欢 阅读(66) 评论(0) 推荐(0)
摘要: #第一种 print("小明,10岁,男,上山去砍柴") print("小明,10岁,男,开车去东北") print("小明,10岁,男,最爱打游戏") print("\n") print("老李,90岁,男,上山去砍柴") print("老李,90岁,男,开车去东北") print("老李,90岁 阅读全文
posted @ 2020-10-26 19:35 陈欢欢 阅读(54) 评论(0) 推荐(0)
摘要: import turtle as t t.pensize(2) for i in range(4): t.fd(150) t.left(90) 阅读全文
posted @ 2020-10-19 19:32 陈欢欢 阅读(444) 评论(0) 推荐(0)
摘要: #PythonDraw.py import turtle turtle.setup(650, 350, 200, 200) turtle.penup() turtle.fd(-250) turtle.pendown() turtle.pensize(25) turtle.pencolor("purp 阅读全文
posted @ 2020-10-19 19:25 陈欢欢 阅读(116) 评论(0) 推荐(0)
摘要: # DigitalPipe.py import turtle,time def drawgap(): turtle.penup() turtle.fd(5) def drawLine(flag): drawgap() turtle.pendown() if flag else turtle.penu 阅读全文
posted @ 2020-10-18 21:49 陈欢欢 阅读(59) 评论(0) 推荐(0)
摘要: #画国际象棋盘,小格边长为width import turtle turtle.speed(0) width = eval(input()) #画黑格 def drawSquare(width): turtle.pendown() turtle.begin_fill() turtle.fillcol 阅读全文
posted @ 2020-10-12 19:31 陈欢欢 阅读(79) 评论(0) 推荐(0)
摘要: import turtle turtle.speed(0) turtle.fillcolor('black') turtle.begin_fill() turtle.circle(120,180) turtle.left(180) turtle.circle(-60,180) turtle.circ 阅读全文
posted @ 2020-10-12 19:29 陈欢欢 阅读(105) 评论(0) 推荐(0)