Commit 62aa78ed by BellCodeEditor

save project

parent 1f038949
Showing with 16 additions and 17 deletions
kk=input("剪刀石头布") import turtle
print("玩家出"+kk) pen=turtle.Pen()
import random turtle.Screen()
listl=['剪刀''石头''布'] screen=turtle.Screen()
k=random.choice(listl) screen.bgcolor("blue")
print("计算机出"+k) pen.write("nihao")
if kk==k: pen.pensize(5)
print("平局") pen.pencolor("red")
elif kk=="石头"and k=="剪刀" pen.left(45)
print("你赢了") pen.forward(100)
elif kk=="布"and k=="石头" pen.circle(50,180)
print("你赢了") pen.right(90)
elif kk=="剪刀"and k=="布" pen.circle(50,180)
print("你赢了") pen.forward(100)
else: turtle.done()
print("计算机赢") \ No newline at end of file
\ 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