Commit 0a85f172 by BellCodeEditor

save project

parent 3fa1196c
Showing with 12 additions and 15 deletions
...@@ -5,30 +5,28 @@ list=["石头","剪刀","布"] ...@@ -5,30 +5,28 @@ list=["石头","剪刀","布"]
if player in list: if player in list:
j=random.choice(list) j=random.choice(list)
print("机器人出拳:" + j) print("机器人出拳:" + j)
if player == "剪刀" if player == "剪刀":
if j =="剪刀" if j =="剪刀":
print("平局") print("平局")
if j =="石头" if j =="石头":
print("机器人赢了") print("机器人赢了")
if j =="布" if j =="布":
print("玩家赢了") print("玩家赢了")
if player == "石头" if player == "石头":
if j =="剪刀" if j =="剪刀":
print("玩家赢了") print("玩家赢了")
if j =="石头" if j =="石头":
print("平局") print("平局")
if j =="布" if j =="布":
print("机器人赢了") print("机器人赢了")
if player == "布" if player == "布":
if j =="剪刀" if j =="剪刀":
print("机器人赢了") print("机器人赢了")
if j =="石头" if j =="石头":
print("玩家赢了") print("玩家赢了")
if j =="布" if j =="布":
print("平局") print("平局")
else: else:
print("你输入错误") 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