Commit daa14e76 by BellCodeEditor

save project

parent 823e412c
Showing with 10 additions and 7 deletions
...@@ -4,9 +4,12 @@ print("玩家出拳"+c) ...@@ -4,9 +4,12 @@ print("玩家出拳"+c)
list=["石头","剪刀","布"] list=["石头","剪刀","布"]
tv=random.choice(list) tv=random.choice(list)
print("计算机出拳"+tv) print("计算机出拳"+tv)
if tv==c: if c in list:
print("平局") if tv==c:
elif (tv=="石头"and c=="布" or tv=="剪刀"and c=="石头" or tv=="布"and c=="剪刀"): print("平局")
print("赢了") elif (tv=="石头"and c=="布" or tv=="剪刀"and c=="石头" or tv=="布"and c=="剪刀"):
else : print("赢了")
print("输了") else :
\ No newline at end of file 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