Commit 3ef62619 by BellCodeEditor

auto save

parent f9b6bca9
Showing with 16 additions and 10 deletions
# 悟空想画个六芒星魔法阵,主要的代码已写出,但这有bug,请你帮忙调试下~ # 玩家出拳
import turtle player = input("请出拳(石头/剪刀/布):")
print("玩家出拳:"+player)
pen= turtle.Pen() # 计算机随机出拳
size=textinput("提示","你想要多大的魔法阵呀?") import random
pen.circle(size) list = ["石头","剪刀", "布"]
pen.circle(size,360,3) computer = random.choice(list)
pen.circle(size,60) print("计算机出拳:"+computer)
pen.circle(size,360,3) # 显示结果
turtle.done() if player == computer:
print("平局")
elif (player=="石头" and computer=="剪刀")or(player=="剪刀" and computer=="布")or(player=="布" and computer=="石头"):
print("恭喜,你赢了")
else:
print("很遗憾,你输了")
\ No newline at end of file
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