Commit 5ff3f637 by BellCodeEditor

auto save

parent c666ac36
Showing with 31 additions and 18 deletions
# 玩家出拳 import turtle
# 玩家出拳 turtle.color("black")
player = input("请出拳:石头,剪刀,布?") turtle.penup()
print("玩家出拳:"+player) turtle.goto(0,-200)
import random turtle.pendown()
list=["石头","剪刀334","布"] turtle.circle(200)
compier=random.choice(list) turtle.penup()
print("电脑出拳:"+compier) turtle.goto(-100,-50)
if player in list: turtle.pendown()
if player == compier: turtle.begin_fill()
print("平局") turtle.color("blue")
else: turtle.begin_poly()
if (player=="石头" and compier=="剪刀") or (player=="布" and compier=="石头") or (player=="剪刀" and compier=="布"): turtle.circle(20)
print("玩家赢了!") turtle.penup()
else: #turtle.goto(-300,50)
print("电脑赢了!") #turtle.pendown()
else: #turtle.goto(0,50)
print("输入错误") #turtle.penup()
#turtle.goto(60,50)
#turtle.done()
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