Commit bcb85289 by BellCodeEditor

save project

parent 220fe62b
Showing with 13 additions and 0 deletions
import random
coe=input("你想出什么,石头/剪刀/布?")
new_list=["石头""剪刀","布"]
suijishu=random.choice(new_list)
print("计算机出了"+suijishu)
print("玩家出了"+coe)
if coe==new_list:
print("平局")
else (new_list=="石头" and name=="剪刀") or(new_list=="剪刀" and name=="布")or(new_list=="布" and name=="石头")
print("玩家输了")
else (new_list=="石头" and name=="布")or(new_list=="剪刀" and name=="石头")or(new_list=="布" and name=="剪刀")
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