Commit e05c891c by BellCodeEditor

auto save

parent 1bad0edb
Showing with 38 additions and 31 deletions
# 悟空想海龟作图画出弹簧隧道,但是出现了bug,运行不了,请你帮助他,修改bug~ 358
import turtle g=
\ No newline at end of file
pen=turtle.Pen()
screen=turtle.Screen()
pen.speed()
pen.hideturtle()
screen.bgcolor('black')
i=0
while i<135:
pen.pencolor('pink')
pen.penup()
pen.goto(0,0)
pen.forward(200)
pen.pendown()
pen.circle(100)
pen.left(2)
i+=1
turtle.done()
\ No newline at end of file
# 勇于挑战的创造师,下面的代码犯了两类典型错误,请你把bug揪出来吧。 import random
area = ['盘丝洞','白骨洞','大雁塔']
monster = {'盘丝洞':'蜘蛛精','白骨洞': '白骨精','大雁塔':'花妖'} h = '黑桃 红桃 方片 梅花'.split()
# 打印出大雁塔 s = '2 3 4 5 6 7 8 9 10 J Q K A'.split()
print(area[3]) p = []
# 向字典中添加 '地府':'僵尸' for i in h:
monster.append('地府','僵尸') for j in s:
print(monster) p.append(i + j)
\ No newline at end of file
pool = random.sample(p, 21)
print("请在下面的牌中选一张记住:")
for i in range(3):
col1, col2, col3 = [], [], []
for i in range(7):
col1.append(pool[i*3])
col2.append(pool[i*3+1])
col3.append(pool[i*3+2])
print(col1[i], col2[i], col3[i])
n = int(input("你选的牌在第几列:"))
if n == 1:
pool = col2 + col1 + col3
elif n == 2:
pool = col1 + col2 + col3
elif n == 3:
pool = col1 + col3 + col2
else:
print("wrong number")
print()
print(f'你选的是{pool[10]}')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment