学生作品
少儿编程侯老师
这个作者很懒,什么都没留下…
展开
-
sunalex -作弊器专栏(周更新)
# 有若干只鸡兔同在一个笼子里,从上面数,有35个头,从下面数,有94只脚。问笼中各有多少只鸡和兔?# 数学题head = 2foot = 6c=2d=4a=int(head)*cb=int(foot)-int(a)tu=int(b)/(int(d)/int(c))ji=head-tuprint(tu)print(ji)# 总结...原创 2020-09-13 15:54:28 · 509 阅读 · 0 评论 -
deqin - 倒放gif
from PIL import Image, ImageSequence# 1.读取gifim = Image.open("mao.gif")# 2。拆分chai = ImageSequence.Iterator(im)index = 1for i in chai: i.save("image/img%d.png"%index) print("正在拆分第%d张"%index) index += 1imgs = [i.copy() for i in ImageSeq原创 2020-09-13 13:44:23 · 419 阅读 · 0 评论 -
teddy -史诗级抽象画‘嘉恒最帅’
import turtleimport randomturtle.pensize(3)turtle.colormode(255)turtle.bgcolor('black')turtle.speed(0)for a in range(1000): d = random.randint(0, 255) e = random.randint(0, 255) f = random.randint(0, 255) j = random.randint(0, 255)原创 2020-09-12 21:47:55 · 476 阅读 · 0 评论 -
sam -海怪
import turtleturtle.speed(0)turtle.shape("turtle")turtle. bgcolor("skyblue")turtle. penup()turtle. goto(-360 , 0)turtle. pendown()turtle. fillcolor("blue")turtle. begin_fill()turtle. fd(720)turtle.right(90)turtle. fd(360)turtle.right(90)turtl.原创 2020-09-12 19:50:46 · 262 阅读 · 0 评论 -
junyi -深海巨兽
import turtleturtle.speed(0)turtle. bgcolor("skyblue")turtle. penup()turtle. goto(-360 , 0)turtle. pendown()turtle. fillcolor("blue")turtle. begin_fill()turtle. fd(720)turtle.right(90)turtle. fd(360)turtle.right(90)turtle. fd(720)turtle.right(原创 2020-09-12 10:45:32 · 568 阅读 · 0 评论 -
jaile - while
# whileimport turtle as tt.speed(0)a=0t.left(180)while 4000>a: t.circle(a) a=a+2t.done()import turtle as tx=20bei = 0t.fillcolor("red")while 1>0: bei=bei-2 t.begin_fill() t.circle(x) t.end_fill() t.up()原创 2020-09-06 11:52:04 · 222 阅读 · 0 评论 -
teddy -猜拳游戏
# 电脑出数字iimport randomcomputer=random.randint(1,10000)a=0while a<35: we = int(input('请猜一个数字')) if we==computer: print('恭喜你猜中了') break if we>computer: print('你猜大了') if we<computer: print('你猜小了')...原创 2020-09-05 21:48:48 · 187 阅读 · 0 评论 -
william - 表情包
import turtleturtle.speed(0)turtle.goto(0,-160)turtle.pensize(6)turtle.color("gray")turtle.fillcolor("yellow")turtle.begin_fill()turtle.circle(160)turtle.end_fill()turtle.up()turtle.goto(-100,40)turtle.down()turtle.left(90)turtle.circle(-40,原创 2020-09-05 20:44:47 · 309 阅读 · 0 评论 -
sam - 深海巨兽
import turtleturtle.speed(0)turtle.shape("turtle")turtle.rt(45+90)turtle.bgcolor("skyblue")turtle.up()turtle.goto(-180*2,0)turtle.down()turtle.fillcolor("blue")turtle.begin_fill()turtle.circle(510,360,4)turtle.end_fill()turtle.up()turtle.goto(原创 2020-09-05 19:43:01 · 213 阅读 · 0 评论 -
danyang - 猜拳游戏
import random'''石头1 布2 剪刀3我们赢电脑 我们 结果1 2 -12 3 -13 1 2'''# 1。电脑出拳,1,3a=random.randint(1,3)# 2。我们出拳we=int(input('please punch'))# 3。判断输赢 or 或者if a-we==-1 or a-we==2 : print('we won')# if(a-we)!=-1#原创 2020-09-05 11:51:15 · 152 阅读 · 0 评论 -
sunalex - 猜数字游戏
import randoma=random.randint(1,10000)for i in range(30): # 电脑随机出一个数字 # 我们猜一个数字 b=int(input("输入一个数字")) # 判断结果 if b==a: print("六块钱去开特斯拉") break elif b<a: print("你比你爷爷————x?") elif b>a: prin原创 2020-09-04 21:49:58 · 178 阅读 · 5 评论 -
zhouzuo - 猜数字游戏
# 电脑出随机数字import randomimport timexiao = 0da = 100a = random.randint(1,100)tt = 1t1 = time.time()while True: print("正在消耗你的第%d次机会"%tt) print("已将耗时%.2f秒"%(time.time()-t1)) tt+=1 # 我们出数字 b = int(input("请输入数字:范围是%d-%d"%(xiao,da)))原创 2020-08-30 18:49:25 · 142 阅读 · 2 评论 -
junyi&junxi - 猜拳游戏
"""石头1 布2 剪刀3我们赢电脑 我们 结果1 2 -12 3 -13 1 2我们s电脑 我们 结果1 3 -22 1 13 2 1"""import random# 我们出拳we = input("请出拳:") #字符串转数字# 电脑出拳 随机数dn = random.randint(1 , 3)jg = dn-int(we)# 判断 石头 剪刀if jg == -1原创 2020-08-30 15:18:28 · 246 阅读 · 0 评论 -
teddy -一个神奇的东西while
# 打印1-100# a=0# while a<101:# #print('嘉恒超级帅')# print(a)# a=a+1# 用while循环画一个正方形?import turtleturtle.speed(0)a=0while a<4000: turtle.circle(0-a) turtle.left(60) # turtle.fd(a) # turtle.lt(a) a=a+1turtle.done原创 2020-08-27 21:47:15 · 211 阅读 · 0 评论 -
dayang - 计算器1.0
a=input('请输入计算公式') # 输入的内容都是字符串的形式print(eval(a))原创 2020-08-27 10:51:07 · 190 阅读 · 0 评论 -
loujinghao - rainbow
import turtleturtle.shape("turtle")turtle.fillcolor("yellow")turtle.speed(1)turtle.left(90)turtle.pensize(35)turtle.pencolor('purple')turtle.circle(100,180)# blue# pensize是圆的粗细turtle.pensize(30)turtle.pencolor('blue')turtle.left(180)turtle.rig原创 2020-08-27 09:45:24 · 152 阅读 · 0 评论 -
jijinghao - 猜数字2.0
# 你出数字,电脑来猜# 电脑出数字 电脑猜 ----》玩100局 # 100局中 1次猜中有多少局?# 每局猜的次数放在列表import random as rrrr = 1ooo = 100xiao = 1da = 100eee = 20www = int(input('请输入你给我猜的数字(牢记请输入%d-%d):'%(xiao,da)))for i in range(eee): qqq = r.randint(rrr, ooo) print(qqq)原创 2020-08-26 19:50:54 · 210 阅读 · 2 评论 -
xingtai -神奇的二维码
from MyQR import myqr as mqmq.run("http://www.4399.com/", picture="cxk.gif", colorized=True, save_name = "lshdhvl.gif")原创 2020-08-25 20:17:20 · 237 阅读 · 0 评论 -
jiale - 猜拳
# 猜拳游戏"""石头1 布2 剪刀3赢:电脑 我们 结果1 2 -12 3 -13 1 2import random# random.random 只能产生一个0-1随机小数a = random.random()print(a)# random.randint 产生一个1-100随机整数b = random.randint(1, 100)print(b)print(a+b)"""# 我们出拳 int# 电脑随机出原创 2020-08-25 13:52:16 · 159 阅读 · 1 评论 -
danyang -用turtle画红绿灯
import turtleimport timefd=300left=90width=150turtle.width(20)turtle.left(left)turtle.fd(fd)turtle.left(left)turtle.fd(width)turtle.left(left)turtle.fd(fd)turtle.left(left)turtle.fd(width)turtle.up()turtle.goto(-75,250)turtle.down()turtle.原创 2020-08-25 10:45:09 · 2562 阅读 · 1 评论 -
zizhan - 猜数字游戏
import random as rimport turtle as tbig = 1000small = 1a = r.randint(small, big)for c in range(20): try: b = int(t.textinput('猜数字小游戏', '请猜一个%s~%s之间的数字' % (small, big))) # t.undo() t.dot(10000, 'white') if a == b:原创 2020-08-24 13:47:35 · 168 阅读 · 0 评论 -
wifi -丑陋巨兽
import turtleturtle.bgcolor("skyblue")turtle.color("blue")turtle.fillcolor("blue")turtle.begin_fill()turtle.fd(720)turtle.right(90)turtle.fd(720)turtle.right(90)turtle.fd(720)turtle.right(90)turtle.fd(720)turtle.end_fill()turtle.done()原创 2020-08-24 11:03:55 · 143 阅读 · 1 评论 -
sunAlex - 九九乘法表
a = input("输入一个数字")b = 1# 1*1=1while b<=int(a) : print("%d*%d=%d" % (int(a), b, int(a) * b)) b=b+1原创 2020-08-24 10:50:50 · 171 阅读 · 0 评论 -
sam - 随便取名变量和彩虹
import turtleturtle.color("purple")turtle.pensize(50)turtle.lt(90)turtle.circle(100,180)turtle.up()turtle.goto(30,0)turtle.down()turtle.color("blue")turtle.lt(180)turtle.circle(130,180)turtle.done()import turtleturtle.speed(0)# 变量:装数据的盒子#原创 2020-08-22 19:50:33 · 250 阅读 · 0 评论 -
jiale - 判断游戏输赢
# 王者荣耀w=int(input("敌方水晶还有多少血"))if w>0: t=int(input("我方水晶还有多少血")) if 0<t<=200: print("不要浪") if t>200: print("带线") if t<=0: print("defeat")else: print("victory")# 上地铁piao = int(input("你有几张票呀"))原创 2020-08-22 13:47:17 · 228 阅读 · 1 评论 -
danyang - 史珍香(变量)
import turtleyellow = 'green'blue = "yellow"red = '''blue'''turtle.color(red)turtle.fillcolor('red')# 变量:装数据的盒子# 变量名:# 1。是由英文字母、数字、下划线任意组成# 2。不能有标点符号、数字不能开头# abc a12345 a.b _ ____ 5_5 蔡徐坤# 取名技巧:见名知意 英文》拼音》中文turtle.speed(0)changdu = 1a原创 2020-08-22 11:49:24 · 187 阅读 · 0 评论 -
william -猜拳游戏
"""石头1 布2 剪刀3我们赢电脑 我们 结果1 2 -12 3 -13 1 2"""# 我们出拳right=input("请出拳")# 电脑出拳?随机import randomcomputer=random.randint(1,3)# 判断输赢jieguo=computer-int(right)if jieguo==-1 or jieguo==2: print("you win")原创 2020-08-21 15:51:28 · 112 阅读 · 0 评论 -
jiale -脸
from turtle import *x=300speed(0)shape("turtle")color("yellow")dot(x)up()goto(x/2,0)down()width(5)color("gray")lt(90)circle(x/2)up()goto(-20,30)down()circle(60,360)up()goto(20,30)down()circle(-60,-360)up()goto(-80,30)down()color("b.原创 2020-08-20 13:46:01 · 116 阅读 · 0 评论 -
zizhan -高级彩虹
import turtle as twidth = 1t.speed(0)t.width(width+4)t.left(90)t.colormode(255)r=250# 红色:255 0 0# 橙色:255 165 0suoxiao = 10print(255*suoxiao-suoxiao*2)for a in range(0,255*2,suoxiao): print(a) if a >= 255: r -= suoxiao原创 2020-08-19 13:45:36 · 156 阅读 · 0 评论 -
sunAlex - 走向光明
import turtleturtle.speed(0)turtle.up()turtle.goto(0,180)turtle.down()a=1while a<255: turtle.colormode(255) turtle.color(0+a,255-a,0) turtle.circle(0-a) a=a+1turtle.done()原创 2020-08-19 10:42:09 · 133 阅读 · 0 评论 -
jinghao -猜数字
import random as rqqq = r.randint(1,10000)eee = 20xiao = 1da = 10000for i in range(20): www = int(input('请输入你猜的数字(%d-%d)提示%d:'%(xiao,da,(xiao+da)/2))) if qqq == www: print('你猜中了!!!!') elif qqq > www: eee -= 1 pri原创 2020-08-17 20:48:06 · 206 阅读 · 0 评论 -
sam-瞄准镜
import turtleturtle.shape("turtle")turtle.pensize(10)turtle.circle(100)turtle.lt(90)turtle.pensize(1)turtle.fd(50)turtle.back(100)turtle.up()turtle.goto(100,100)turtle.down()turtle.rt(90)turtle.fd(50)turtle.back(100)turtle.up()turtle.goto(0,原创 2020-08-17 19:40:16 · 159 阅读 · 0 评论 -
sunAlex -想改什么就改什么
from turtle import*a=1speed(0)while a<4000: # fd(a) circle(a) rt(90) a=a+1from turtle import*speed(0)up()goto(0,-360)c=0down()a=5fillcolor("red")while c<9999999999999999999999999999: begin_fill() circle(a) end原创 2020-08-17 10:50:29 · 119 阅读 · 0 评论 -
周左 - big胖次
a = ("red","orange","yellow","green","cyan")import turtleturtle.speed(0)for wc in range(200): turtle.color(a[wc//41]) turtle.fd(100) turtle.backward(130) turtle.fd(30) turtle.left(1)turtle.done()原创 2020-08-16 18:43:34 · 142 阅读 · 0 评论 -
bowen -猜拳游戏
import random"""石头1 布2 剪刀3我们赢电脑 我们 结果1 2 -12 3 -13 1 2"""# 我们出拳we=int(input('你想出什么'))print(we)computer=random.randint(1,3)print(computer)a=computer-weif a==-1 or a==2: print('你赢了')# 判断输赢...原创 2020-08-15 16:47:37 · 124 阅读 · 0 评论 -
jiale -爆炸
import timeimport turtleturtle.write("3",font=(None,100))time.sleep(1)turtle.undo()time.sleep(1)turtle.write("2",font=(None,100))time.sleep(1)turtle.undo()time.sleep(1)turtle.write("3",font=(None,100))time.sleep(1)turtle.undo()time.sleep(1)t原创 2020-08-15 13:50:41 · 157 阅读 · 0 评论 -
zizhan - 调色盘
import turtle as tt.speed(0)a=1000color=1color2=0color3=0t.width(10)t.lt(90)t.fd(100)flag1 = Trueflag2 = Falsewhile a>=0: t.color((color3,color2,color)) t.dot(a) a-=1000/400 if flag1: if color > 0.1: col原创 2020-08-14 13:44:33 · 163 阅读 · 0 评论 -
sunAlex -猜拳游戏4.0
import randomju = 0our = input("请出拳 石头=1布=2剪刀=3 ")# 电脑随机出拳com = random.randint(1, 3)try: n = int(our[ju]) a = int(our[ju]) - com if n == 3 and com == 3: print("剪刀VS剪刀") elif n == 3 and com == 2: print("剪刀VS布") elif原创 2020-08-14 10:48:06 · 136 阅读 · 0 评论 -
teddy-今生第一、二款游戏——剪刀石头布 teddy最棒
# 剪刀石头布"""石头1 布2 剪刀3我们输电脑 我们 规律1 3 -22 1 13 2 1"""# 出拳# 我们出拳we = input('请出拳(石头1 布2 剪刀3):')print(we)# 电脑出拳import randomcomputer=random.randint(1,3)print(computer)bl=computer-int(we)print(bl)#原创 2020-08-13 21:46:40 · 205 阅读 · 0 评论 -
jiale-大海
import turtleturtle.bgcolor("skyblue")turtle.speed(0)turtle.fillcolor("blue")turtle.up()turtle.goto(-360,0)turtle.down()turtle.lt(45)turtle.begin_fill()turtle.circle(-600,360,4)turtle.end_fill()turtle.up()turtle.goto(100,150)turtle.rt(45)tu原创 2020-08-13 13:46:07 · 149 阅读 · 0 评论