Commit 9cf0b1bd by BellCodeEditor

auto save

parent 57fb71f3
Showing with 36 additions and 25 deletions
......@@ -6,13 +6,16 @@ list=["剪刀","石头","布"]
w=random.choice(list)
print("电脑出拳:"+w)
if q==w:
print("平局")
elif q=="剪刀" and w=="布":
print("你赢了")
elif q=="石头" and w=="剪刀":
print("你赢了")
elif q=="布" and w=="石头":
print("你赢了")
if q in list:
if q==w:
print("平局")
elif q=="剪刀" and w=="布":
print("你赢了")
elif q=="石头" and w=="剪刀":
print("你赢了")
elif q=="布" and w=="石头":
print("你赢了")
else:
print("你输了")
else:
print("你输了")
\ No newline at end of file
print("输入错误")
\ No newline at end of file
import turtle
pen=turtle.Pen()
pen.write("致诺伊:\n你最近好吗,\n我新学了一首诗念给你听.\n《静夜思》",font=("方正舒体",40,"normal"))
pen.hideturtle()
turtle.done()
player=input("请出拳")
print("玩家出拳:"+player)
q=input("请出拳")
print("玩家出拳:"+q)
import random
list=["剪刀","石头","布"]
computer=random.choice(list)
print("电脑出拳:"+computer)
w=random.choice(list)
print("电脑出拳:"+w)
if q in list:
if q==w:
print("平局")
elif q=="剪刀" and w=="布":
print("你赢了")
elif q=="石头" and w=="剪刀":
print("你赢了")
elif q=="布" and w=="石头":
print("你赢了")
else:
print("你输了")
else:
print("输入错误")
if player==computer:
print("平局")
elif player=="石头"and computer=="剪刀":
print("恭喜,你赢了")
elif player=="剪刀"and computer=="布"
print("恭喜,你赢了)
elif player==""and computer=="石头":
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