- 博客(46)
- 收藏
- 关注
原创 编程-来宇韬
随机画import turtleimport randomp = turtle.Pen()p.speed(0)color_lst = ["red","orange","yellow","green","blue","cyan","purple"]lengths = [3,4,5,6,7]def triangle(x,y,z,color,length): p.penup() p.goto(x,y) p.pendown() p.fillcolor(color)
2021-09-04 14:51:11 164
原创 编程-刘沐原
机器猫import turtlea=turtle.Pen()def face(): a.fillcolor("blue") a.begin_fill() a.circle(100) a.end_fill() a.fillcolor("white") a.begin_fill() a.circle(80) a.end_fill()def eyes(): a.penup() a.goto(0,160) a.p
2021-09-01 20:52:14 146
原创 编程-朱哲文
分离数字字符串def calculate(a): result=b(a) print(result)def isnum(c): if c not in"+-*/": return True return Falsedef b(a): num=[] op=[] index=0 for i in range(len(a)): if isnum(a[i]): if i==len(a)-1:
2021-08-28 09:55:41 160
原创 少儿编程-周想
月亮-星星import turtlea=turtle.Pen()a.speed(0)turtle.bgcolor("skyblue")a.color("yellow")a.begin_fill()a.circle(100,180)a.left(135)a.circle(-141,90)a.end_fill()a.penup()a.goto(-200,300)a.begin_fill()a.forward(100)a.right(144)a.forward(100)a.r
2021-08-18 15:55:17 125
原创 2021-07-17
弹弹球import pygame,randompygame.init()s_width = 500s_height = 500# 小球的坐标ball_pos = [250,450]ball_lst = []#板子的坐标rect_pos=[250,450]b_m_dir = [1,1]screen = pygame.display.set_mode((s_width,s_height))# 板子,球体和小球对象black_board = Noneblack_ball = None
2021-07-17 16:02:50 121
原创 少儿编程-覃玺睿-2
计算器:import tkinterimport cal_coreclass MainWindow(): root = tkinter.Tk() def __init__(self): self.root.configure(background="#4990CF") self.content=tkinter.StringVar() self.result=tkinter.StringVar() def draw_surfac
2021-07-15 21:55:55 95
原创 少儿编程-王铭麒
陀螺import turtlelst=['red','blue','green']turtle.tracer(False)angle=5def draw(): turtle.clear() turtle.pensize(15) for i in range(3): turtle.forward(200) turtle.dot(200,lst[i]) turtle.backward(200) turtle.lef
2021-07-03 21:55:25 116
原创 少儿编程-邹晟浩-2
typegameimport pygameimport sysimport random# 窗口class Window: def __init__(self): self.length = 1180 self.height = 775 self.apple_fre = 0 self.apples = pygame.sprite.Group() self.background = pygame.image.
2021-04-17 15:57:43 98
原创 少儿编程-俞嘉乐
元组删除元素# 待删除元素的索引列表min_index_lst = []# 最小索引min_index = 0# 待删除的列表lst = [1, 2, 3, 4, 5, 3, 2, 1, 45, 1,200,1,232,213,1,1,231]# 删除元素之后的列表re_lst = []# 从前往后 找到第一个最小数字所在位置的索引for i in range(len(lst)): if lst[i] < lst[min_index]: min_index
2021-02-21 15:53:55 157
原创 少儿编程-杨紫鑫
绘制彩虹import turtle as tt.speed(0)t.pensize(10)t.pencolor("purple")t.penup()t.goto(50,0)t.pendown()t.left(90)t.circle(50,180)t.pensize(20)t.pencolor("blue")t.penup()t.goto(65,0)t.pendown()t.left(180)t.circle(65,180)t.pensize(30)t.pencol
2021-02-07 10:57:06 206
原创 少儿编程-林家玮
糖葫芦import turtleturtle.forward(100)turtle.dot(20,"red")turtle.forward(25)turtle.dot(30,"orange")turtle.forward(35)turtle.dot(40,"yellow")turtle.forward(45)turtle.dot(50,"green")turtle.done()
2021-02-01 16:52:47 197 2
原创 少儿编程-聂士翔
cls29 -机器猫import turtlep = turtle.Pen()def face(): p.fillcolor("blue") p.begin_fill() p.circle(100) p.end_fill() p.fillcolor("white") p.begin_fill() p.circle(80) p.end_fill()def eye(): p.penup() p.goto(0,160)
2021-01-30 14:56:54 329
原创 少儿编程-许皓轩
cls04-瞄准镜import turtleturtle.pensize(5)turtle.hideturtle()turtle.penup()turtle.goto(0,-100)turtle.pendown()turtle.circle(100)turtle.goto(0,100)turtle.penup()turtle.goto(-100,0)turtle.pendown()turtle.goto(100,0)turtle.penup()turtle.goto(-25,
2021-01-30 11:54:23 105
原创 少儿编程-覃宏新
cls09-绘制电路import turtleturtle.pensize(4)turtle.pencolor("yellow")turtle.fillcolor("green")turtle.begin_fill()turtle.forward(100)turtle.left(90)turtle.forward(50)turtle.left(90)turtle.forward(100)turtle.left(90)turtle.forward(50)turtle.left(90)
2021-01-22 17:50:16 215 1
原创 简单版本的十点半
简单版本的十点半import randomcard_num = ["A", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K"]card_cate = ["♣","♦","♠","♥"]cards = []player_1 = []player_2 = []running = Truefor i in card_cate: for j in card_num: cards.append("%
2021-01-13 18:57:32 226 1
原创 少儿编程-范灵枢
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>The dormouse's story</title></head><body> <p class="title"> <b>Thr Dormouse's story</b> </p
2020-11-21 10:25:13 157
原创 少儿编程-陈泽哲
彩虹## 七色彩虹import turtle as tt.pencolor("red")t.pensize(20)t.left(90)t.circle(200,180)t.pencolor("orange")t.pensize(18)t.left(180)t.penup()t.goto(-10,0)t.pendown()t.circle(190,180)t.pencolor("yellow")t.pensize(16)t.left(180)t.penup()t.goto
2020-10-23 19:54:39 200
原创 少儿编程-陈名乐
绘制棒棒糖import turtleturtle.bgcolor("pink")turtle.penup()turtle.colormode(255)turtle.fillcolor(250,250,100)turtle.begin_fill()turtle.circle(150,360)turtle.end_fill()turtle.goto(0,20)turtle.fillcolor(255,100,100)turtle.begin_fill()turtle.circle
2020-10-18 14:58:28 129
原创 少儿编程-张昕泽
cls04 绘制瞄准镜import turtleturtle.speed(0)turtle.penup()turtle.goto(0,0)turtle.pendown()turtle.circle(100)turtle.goto(0,200)turtle.penup()turtle.goto(-100,100)turtle.pendown()turtle.forward(200)turtle.penup()turtle.goto(0,50)turtle.pendown()
2020-10-18 13:34:25 235
原创 常规课等级知识点思维导图链接
一级知识点:二级知识点:https://shimo.im/mindmaps/9K6vkwRDXK9GKtgV/ 《平安好学常规课二级知识点》,可复制链接后用石墨文档 App 或小程序打开
2020-10-13 21:44:29 188
原创 cls 34绘制钟表
import turtle,timeturtle.tracer(1,0)# p:绘制表盘 s:绘制秒针 m:绘制分针 h:绘制时针p = turtle.Pen()h = turtle.Pen()m = turtle.Pen()s = turtle.Pen()#angle_h:时针角度 angle_m:分针角度 angle_s:秒针角度angle_h,angle_m,angle_s = 30,0,60# 绘制表盘def clock(): for i in range(60
2020-10-08 11:26:26 147
原创 少儿编程 - 景昱哲
cls16 数字炸弹import randomprint("数字炸弹游戏开始,\n请先输入一个数字")p = random.randint(0,1000)number=int(input("please type a number"))print(number)while number!=p: if number>p: print("偏大") if number<p: print("偏小") number = int(inp
2020-08-28 09:24:54 111
原创 绘制蜡笔小新
import turtlep = turtle.Pen()p.speed(0)p.pensize(3)# 绘制脸p.setheading(160)turtle.colormode(255)p.fillcolor(255,205,168)p.begin_fill()p.circle(60, 200)for i in range(100): p.left(0.2) p.forward(2)p.right(30)p.circle(40,270)p.circle(40,-2
2020-08-27 23:28:19 3243 2
原创 少儿编程 -苏苏
cls28 绘制机器猫import turtlep=turtle.Pen()def face(): p.fillcolor("blue") p.begin_fill() p.circle(100) p.end_fill() p.fillcolor("white") p.begin_fill() p.circle(80) p.end_fill()def eye(): p.penup() p.goto(0,160)
2020-08-16 22:26:47 135
原创 绘制钢铁侠
import turtlet = turtle.Pen()t.pensize(5)t.speed(0)t.hideturtle()def head(): t.fillcolor("red") t.begin_fill() t.forward(50) t.left(45) t.forward(141) t.left(45) t.forward(180) t.circle(150,180) t.forward(180)
2020-08-13 17:18:01 7207 3
原创 少儿编程-毛宇星
cls3 绘制小房子import turtleturtle.pensize(20)turtle.left(60)turtle.forward(100)turtle.right(120)turtle.forward(100)turtle.pensize(2)turtle.right(30)turtle.forward(100)turtle.right(90)turtle.forward(100)turtle.right(90)turtle.forward(140)turtle.d
2020-07-31 15:14:54 187
原创 34 旋转的陀螺
import turtleimport threadingturtle.tracer(False)state = {"turn":150}def spinner(): color_list = ['red','green','blue'] turtle.clear() for i in range(3): turtle.pensize(10) turtle.forward(200) turtle.pencolor(color_l
2020-07-22 19:48:37 311
原创 cls31 键盘绘图
import turtlecolor_dic = {"green":(300,140),"red":(300,100),"blue":(300,60),"yellow":(300,20),}p1 = turtle.Pen()p = turtle.Pen()p1.hideturtle()p1.penup()p1.goto(285,170)p1.pendown()for i in range(2): p1.fd(30) p1.right(90) p1.fd(200)
2020-06-24 19:49:46 245
原创 cls29 DIY计算机案例代码
# 是否是数字def isnum(c): if c not in "+-*/": return True return False# 分离数字和操作符# def splitCal(content):# numLst = []# opLst = []# temp = ''## for i in range(len(content)):# if isnum(content[i]):#
2020-06-16 21:57:12 175
原创 cls19 快速排序
快速排序a_list = [930, 670, 370, 770, 1034, 490, 90, 210]for i in range(len(a_list)): for j in range(i+1, len(a_list)): if a_list[i] < a_list[j]: temp = a_list[i] a_list[i] = a_list[j] a_list[j] = tempprint
2020-06-14 19:50:10 138
原创 john郭超
cls15 猜数字赢金币import randomran_num = random.randint(1,550)answer = int(input("输入一个数字"))while ran_num!=answer: print("你答错了") if ran_num<answer: print("猜大了") else: print("猜小了") answer = int(input("输入一个数字"))print("踩中了炸弹"
2020-06-14 12:05:26 124
原创 cls28 绘制机器猫
绘制机器猫案例代码"""绘制机器猫"""import turtlep = turtle.Pen()p.speed(0)def face(): p.fillcolor("blue") p.begin_fill() p.circle(100) p.end_fill() p.fillcolor("white") p.begin_fill() p.circle(80) p.end_fill()def eye(): #绘制左眼
2020-06-12 20:00:05 247
原创 cls27 单词检查机
案例代码"""cls27单词检查机"""check = True# 生词本new_words_lists = {"教师":"tutor","前进":"forward","后退":"backward","向左":"left","向右":"right","向右":"right"}#检查本check_words_lists = {}while check: #复制生词本中的单词到检查本中,并清空检查本中的内容 # 回答错误重新添加到生词本 check_words_lists
2020-06-04 17:45:52 352
原创 cls26 -集合案例代码
hobby1 = {"玩游戏","看电视","听音乐"}hobby2 = {"唱歌","购物","看电视"}hobby3 = {"玩游戏","听音乐"}union1,union2,union3 = hobby1&hobby2,hobby1&hobby3,hobby2&hobby3print(len(union1),len(union2),len(union3))lst = [{"姓名":"S1","爱好":hobby1},{"姓名":"S2","爱好":hobby2},{"
2020-06-03 19:04:19 184
原创 cls22绘制六色彩虹-血盆大口
import turtlea=(1,2,3,4,5,6)# 创建画笔并设置线条粗细和填充颜色p = turtle.Pen()p.pensize(5)p.fillcolor("red")# 抬笔到指定未知,目的是为了更好的绘制圆角p.penup()p.goto(160,0)p.pendown()p.setheading(180)# 绘制写喷大口,并填充颜色p.begin_fill()p.forward(160)p.circle(20,90)p.forward(70)p.circ
2020-05-26 19:59:24 389 2
原创 少儿编程Python-猜数字,赢金币
import randomnum = random.randint(1,6)answer_num = int(input("请输入你的答案"))while answer_num!=num: if answer_num>num: print("猜大了") else: print("猜小了") answer_num = int(input("请输入你的答案"))print("恭喜你答对了")...
2020-05-10 17:25:28 459
原创 少儿编程Python--绘制美队盾牌
import turtlep = turtle.Pen()def draw_pic(x,y): p.speed(0) p.penup() p.goto(x,y) p.pendown() p.setheading(0) p.clear() r = 100 length = 20 p.fillcolor("#c7143b") p.begin_fill() p.circle(r,360) p.end_fill
2020-05-08 19:58:52 591
原创 少儿编程绘制电路--by John.郭超
import turtleturtle.pencolor("orange")turtle.pensize(5)turtle.fillcolor("green")turtle.begin_fill()turtle.forward(100)turtle.left(90)turtle.forward(50)turtle.left(90)turtle.forward(100)turt...
2020-05-03 12:12:34 224
原创 少儿编程 Python 绘制电路 分支结构
import turtlea = "on"b = "on"# 绘制电池turtle.pencolor("orange")turtle.fillcolor("green")turtle.begin_fill()turtle.pensize(5)turtle.forward(100)turtle.left(90)turtle.forward(50)turtle.left(90)...
2020-04-29 19:45:17 396
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人