Commit 1c80e383 by BellCodeEditor

save project

parent 347715d6
Showing with 11 additions and 10 deletions
...@@ -4,13 +4,14 @@ print("玩家出去:"+player) ...@@ -4,13 +4,14 @@ print("玩家出去:"+player)
list=["石头","剪刀","布"] list=["石头","剪刀","布"]
compurter=random.choice(list) compurter=random.choice(list)
print("电脑出去:"+compurter) print("电脑出去:"+compurter)
if player==compurter: if player in list:
print("平局") if player==compurter:
elif player=="石头"and compurter=="剪刀" print("平局")
print("赢") elif player=="石头"and compurter=="剪刀"
elif player=="布" and compurter=="石头" print("赢")
print("赢") elif player=="布" and compurter=="石头"
elif player=="剪刀" and compurter=="布": print("赢")
print("赢") elif player=="剪刀" and compurter=="布":
print("赢")
else: else:
print("输") 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