摘要: #玫瑰花 import turtle turtle.penup() turtle.left(90) turtle.fd(200) turtle.pendown() turtle.right(90) from turtle import * fillcolor('red') begin_fill() turtle.circle(30,60) turtle.circle(10,90) turtle.... 阅读全文
posted @ 2018-04-12 10:34 宋哥哥 阅读(521) 评论(0) 推荐(0)
摘要: #蛇.py import turtle turtle.setup(600,500,300,300) turtle.penup() turtle.fd(-60) turtle.pendown() turtle.pensize(10) turtle.pencolor("green") turtle.seth(60) for i in range(6): turtle.circle(-40,4... 阅读全文
posted @ 2018-04-03 16:46 宋哥哥 阅读(986) 评论(0) 推荐(0)
摘要: a=eval(input("输入一个三位数:")) x=a//100 y=(a-x*100)//10 z=a%10 print("该数的百位为:{}".format(x)) print("该数的十位为:{}".format(y)) print("该数的各位为:{}".format(z)) 阅读全文
posted @ 2018-03-30 09:00 宋哥哥 阅读(84) 评论(0) 推荐(0)
摘要: a=eval(input("想计算2的几次方:")) print(pow(2,a) 阅读全文
posted @ 2018-03-29 12:45 宋哥哥 阅读(104) 评论(0) 推荐(0)
摘要: import turtle turtle.setup(800,800,600,600) turtle.penup() turtle.fd(-300) turtle.pendown() turtle.pencolor('black') turtle.pensize(5) turtle.seth(0) from turtle import * fillcolor("black") begin_fil... 阅读全文
posted @ 2018-03-29 12:41 宋哥哥 阅读(102) 评论(0) 推荐(0)
摘要: #无边正方形.py import turtle turtle.setup(600,500,200,200) turtle.penup() turtle.fd(-30) turtle.pendown() turtle.pensize(5) turtle.pencolor("blue") turtle.seth(0) for i in range(4): turtle.penup() ... 阅读全文
posted @ 2018-03-29 12:39 宋哥哥 阅读(61) 评论(0) 推荐(0)
摘要: #蛇.py import turtle turtle.setup(600,500,300,300) turtle.penup() turtle.fd(-60) turtle.pendown() turtle.pensize(10) turtle.pencolor("green") turtle.seth(60) for i in range(6): turtle.circle(-40,4... 阅读全文
posted @ 2018-03-29 12:39 宋哥哥 阅读(81) 评论(0) 推荐(0)
摘要: #正方形螺旋线.py import turtle turtle.setup(600,500,200,200) turtle.penup() turtle.fd(-220) turtle.pendown() turtle.pensize(5) turtle.pencolor("green") turtle.seth(60) turtle.fd(400*2/3) for i in range(2):... 阅读全文
posted @ 2018-03-29 12:38 宋哥哥 阅读(65) 评论(0) 推荐(0)
摘要: #叠加等边三角形.py import turtle turtle.penup() turtle.fd(-50) turtle.pendown() turtle.pensize(6) turtle.pencolor("black") turtle.seth(60) turtle.fd(300/2) for i in range(2): turtle.right(120) turtl... 阅读全文
posted @ 2018-03-29 12:38 宋哥哥 阅读(78) 评论(0) 推荐(0)