Commit 9fe927c7 by BellCodeEditor

save project

parent 3d132aa0
Showing with 7 additions and 0 deletions
...@@ -4,3 +4,9 @@ list=["石头","剪刀","布"] ...@@ -4,3 +4,9 @@ list=["石头","剪刀","布"]
cp=random.choist(list) cp=random.choist(list)
print(list) print(list)
print("电脑出拳"+cp) print("电脑出拳"+cp)
if player==cp:
print("平局")
elif player=="石头" and cp=="剪刀" or player=="剪刀" and cp=="布" or player=="石头" and cp =="布"
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