Commit d060b41a by BellCodeEditor

save project

parent 151ce199
Showing with 8 additions and 7 deletions
import random
list=["石头""剪刀""布"]
hhh=random.choice(list)
print(hhh)
\ No newline at end of file
......@@ -3,4 +3,10 @@ print("玩家出拳:"+player)
import random
list=["石头","剪刀","布"]
hhh=random.choice(list)
print("计算机出拳:"+hhh)
\ No newline at end of file
print("计算机出拳:"+hhh)
if player==hhh:
print("平局")
elif (player=="石头" and hhh=="剪刀") or (player=="剪刀" and hhh=="布") or (player=="布" and hhh=="石头"):
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