Commit f24a8e0d by BellCodeEditor

auto save

parent 5ed0112c
Showing with 16 additions and 11 deletions
import turtle player=input("请输入石头/剪刀/布:")
pen=turtle.Pen() print("玩家出"+player)
color=input("你想要什么颜色的五角星") import random
pen.fillcolor(color) list=["石头","剪刀","布"]
pen.begin_fill() computer=random.choice(list)
for i in range(5): print(computer)
pen.fd(200) if player==computer:
pen.right(144) print("平局")
pen.end_fill() elif player=="石头" and computer=="剪刀":
turtle.down() print("玩家赢")
elif player=="剪刀" and computer=="布":
print("玩家赢")
elif player=="布" and computer=="石头":
print("玩家赢")
else:
print("玩家输")
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