Commit ec713032 by BellCodeEditor

save project

parent fb26c0ee
Showing with 14 additions and 4 deletions
player=input("剪刀或石头或布")
print("玩家出"+player)
import random
kk=["剪刀","石头","布"]
k=random.choice(kk)
print(k)
\ No newline at end of file
computer=["剪刀","石头","布"]
k=random.choice(computer)
print(k)
if player==k:
print("平局")
elif player=="剪刀"and k=="布":
print("你赢了")
elif player=="石头"and k=="剪刀":
print("你赢了")
elif player=="布"and k=="石头":
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