Commit 7805a03f by BellCodeEditor

auto save

parent f8965990
Showing with 12 additions and 2 deletions
import random
hum=input("请玩家出拳:石头/剪刀/布")
hum=input("请玩家出拳:石头/剪刀/布")
print("玩家出:"+hum)
list=["石头","剪刀","布"]
list=['石头','剪刀','布']
com=random.choice(list)
print("电脑出:"+com)
if hum in list:
if(hum == "石头" and com == "剪刀") or (hum == "布" and com == "石头") or (hum == "剪刀" and com == "布"):
print("恭喜你,你赢了")
elif (hum == "剪刀" and com == "石头") or (hum == "石头" and com == "布") or (hum == "布" and com == "剪刀"):
print("不好意思,你输了")
else:
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