自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(7)
  • 收藏
  • 关注

原创 递归函数用法

def test01(n):print(“test01:”,n)if n==0:print(“over”)else:test01(n-1)print("test01***",n)def test02():print(“test02”)test01(5)

2020-03-06 11:52:16 242

原创 绘制棋盘

import turtlea = turtlefor i in range(11):a.penup()a.goto(-100,-i20)a.pendown()a.forward(200)a.left(270)for x in range(11):a.penup()a.goto(100-x20,0)a.pendown()a.forward(200)turtle.done()...

2020-03-05 11:46:10 795

原创 返回数值

def add(a,b):print(“计算两个数的和:{0},{1},{2}”.format(a,b,(a+b)))return a+bdef test02():print(“sxt”)print(“gao”)returnprint("hello")def test03(x,y,z):return [x10,y10,z*10]c = add(30,40)print(...

2020-02-28 15:50:58 188

原创 嵌套函数,死循环处理

score = int(input(“请输入一个在0-100之间的数字:”))degree = “ABCDE”num = 0if score>100 or score<0:scere = int (input(“输入错误!请重新输入一个在0-100之间的数字:”))else:num = score//10if num<6:num=5print(“分数是{0},等级...

2020-02-26 17:03:32 386

原创 列表,,元组,

a=(18,48,23,34,25,)sorted(a)[18, 23, 25, 34, 48]a=[10,20,30]b=[40,50,60]c=zip(a,b)c<zip object at 0x00000000034B4548>import turtleimport mathx1,y1=150,150x2,y2=150,-150x...

2020-02-25 13:42:30 59

原创 简单函数的应用

import turtleimport math#定义多个点的坐标x1,y1=200,200x2,y2=200,-200x3,y3=-200,-200x4,y4=-200,200#画折线turtle.penup()turtle.goto(x1,y1)turtle.pendown()turtle.goto(x2,y2)turtle.goto(x3,y3)turtle.got...

2020-02-24 11:52:32 173

原创 2020.2.22我的第一个python程序

x=100x100id(x)8791543619488type(x)<class ‘int’>=====================#绘制奥运五环import turtleturtle.width(10)turtle.color(“red”)turtle.circle(50)turtle.penup()turtle.goto(120,0)turtle....

2020-02-22 15:29:02 516

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除