Commit 2d4d511b by BellCodeEditor

save project

parent 541dc136
Showing with 12 additions and 4 deletions
import random import random
b =["石头","剪刀","布"] while True:
a=random.choice(b) c = input("你出(石头/剪刀/布):")
print("机器出"+a) print("你出" + c)
\ No newline at end of file b =["石头","剪刀","布"]
a=random.choice(b)
print("机器出"+a)
if c==a:
print("平局")
elif c == "石头" and a == "剪刀" or c == "剪刀" and a =="布" or c == "布" and a == "石头":
print("你赢了")
else :
print("你输了")
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