Commit 11f1362f by BellCodeEditor

save project

parent 25102f6b
Showing with 11 additions and 14 deletions
import random import turtle
pen=turtle.Pen()
player=input("请出钱") pen.shape("turtle")
cn = ["剪刀","石头","布"] pen.fillcolor("red")
cn1=random.choice(cn) pen.begin_fill()
print(cn1) for i in range(5):
if player in cn: pen.forward(100)
if player=="剪刀" and cn1=="布" or player == "布" and cn1=="石头" or player == "石头" and cn1 == "剪刀": pen.right(144)
print("胜利") pen.end_fill()
turtle.done()
elif player == cn1: \ No newline at end of file
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