Commit 61e409ea by BellCodeEditor

save project

parent d1b44670
Showing with 9 additions and 6 deletions
...@@ -4,9 +4,12 @@ import random ...@@ -4,9 +4,12 @@ import random
list=("石头","剪刀","布") list=("石头","剪刀","布")
l=random.choice(list) l=random.choice(list)
print("电脑出",l) print("电脑出",l)
if p==l: if p in list:
print("平局") if p==l:
elif (p=="剪刀" and l=="石头") or (p=="石头" and l=="布") or (p=="布" and l=="剪刀"): print("平局")
print("lose") elif (p=="剪刀" and l=="石头") or (p=="石头" and l=="布") or (p=="布" and l=="剪刀"):
print("lose")
else:
print("Ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh")
else: else:
print("Ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh") print("说错了")
\ No newline at end of file \ 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