Commit e05c891c by BellCodeEditor

auto save

parent 1bad0edb
Showing with 38 additions and 31 deletions
# 悟空想海龟作图画出弹簧隧道,但是出现了bug,运行不了,请你帮助他,修改bug~
import turtle
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
358
g=
\ No newline at end of file
# 勇于挑战的创造师,下面的代码犯了两类典型错误,请你把bug揪出来吧。
area = ['盘丝洞','白骨洞','大雁塔']
monster = {'盘丝洞':'蜘蛛精','白骨洞': '白骨精','大雁塔':'花妖'}
# 打印出大雁塔
print(area[3])
# 向字典中添加 '地府':'僵尸'
monster.append('地府','僵尸')
print(monster)
\ No newline at end of file
import random
h = '黑桃 红桃 方片 梅花'.split()
s = '2 3 4 5 6 7 8 9 10 J Q K A'.split()
p = []
for i in h:
for j in s:
p.append(i + j)
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