Commit b15caa2e by BellCodeEditor

save project

parent 851da48f
Showing with 6 additions and 19 deletions
import turtle
import random Pen=turtle.Pen()
list=["石头","剪刀","布"] Pen.write("春晓\n春眠不觉晓。\n处处闻啼鸟。\n夜来风雨声,\n花落知多少。",font=("Times",30,"normal"))
computer=random.choice(list) Pen.hideturtle()
print(computer) turtle.done()
if player in list: \ No newline at end of file
if("player"="computer"):
print("平局")
elif player=="石头"and computer=="剪刀"
print("恭喜你,胜利了")
elif player=="布"and computer=="石头"
print("恭喜你,胜利了")
elif player=="剪刀"and computer=="布"
print("恭喜你,胜利了")
else:
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