Commit 116b0f0d by BellCodeEditor

auto save

parent 09d167bd
Showing with 2 additions and 18 deletions
list=['石',"剪","布"] list=['石',"剪","布"]
import random \ No newline at end of file
while True:
play = input("出拳")
if play in list:
print("play"+play)
list=['石',"剪","布"]
cumputer=random.choice(list)
print("cumputer"+cumputer)
if play==cumputer:
print("平")
elif (play=="布" and cumputer=="石") or (play=="剪" and cumputer=="布") or (play=="石" and cumputer=="剪"):
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