Commit 88e95c40 by BellCodeEditor

save project

parent 9ca5bcad
Showing with 10 additions and 3 deletions
......@@ -2,5 +2,12 @@ chu=input("出拳")
print("玩家出拳:"+chu)
import random
list=["石頭","剪刀","布"]
compurt=random.choice(list)
print("電腦出拳:"+compurt)
\ No newline at end of file
computer=random.choice(list)
print("電腦出拳:"+computer)
if chu==computer:
print("平局")
elif(chu=="石頭" and computer=="剪刀")or(chu=="剪刀" and computer=="布")
or(chu=="布" and computer=="石頭"):
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