Commit da31f2b1 by BellCodeEditor

save project

parent 26a67d6c
Showing with 18 additions and 5 deletions
# 玩家出拳
player=input("请出拳(石头/剪刀/布):")
print("玩家出拳"+player)
c=input("请出拳(石头/剪刀/布):")
print("玩家出拳"+c)
import random as rd
list=("石头","剪刀","布")
cp_chioce=rd.choice(list)
print(cp_chioce)
\ No newline at end of file
ch=rd.choice(list)
#print(cp_chioce)
if c==ch:
print ("平局")
elif c=='石头' and ch=='剪刀':
print('win')
elif c=='石头' and ch=='布':
print('lose')
elif c=='布' and ch=='石头':
print('win')
elif c=='布' and ch=='剪刀':
print('lose')
elif c=='剪刀' and ch=='石头':
print('win')
elif c=='剪刀' and ch=='布':
print('win')
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