Commit 63c5c9d1 by BellCodeEditor

save project

parent 4427fe34
Showing with 20 additions and 3 deletions
inport random
import random
SB=input("玩家出(石头、剪刀、布)")
print("玩家出"+SB)# 玩家出拳
list=["石头","剪刀","布"]
robot=random.choice(list)
print("电脑出"+robot)
\ No newline at end of file
print("电脑出"+robot)
if SB in list:
if SB==robot:
prink("平局")
if SB=="布" and robot=="石头":
prink("you win")
if SB=="剪刀" and robot=="布":
prink("you win")
if SB=="石头" and robot=="剪刀":
prink("you win")
if SB=="石头" and robot=="布":
prink("you lost")
if SB=="布" and robot=="剪刀":
prink("you lost")
if SB=="剪刀" and robot=="石头":
prink("you lost")
else:
prink ("错了")
\ 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