Commit 57fb71f3 by BellCodeEditor

save project

parent 7960a913
Showing with 26 additions and 2 deletions
q=input("请出拳") q=input("请出拳")
print(q+"nihao") print("玩家出拳:"+q)
\ No newline at end of file
import random
list=["剪刀","石头","布"]
w=random.choice(list)
print("电脑出拳:"+w)
if q==w:
print("平局")
elif q=="剪刀" and w=="布":
print("你赢了")
elif q=="石头" and w=="剪刀":
print("你赢了")
elif q=="布" and w=="石头":
print("你赢了")
else:
print("你输了")
\ No newline at end of file
player=input("请出拳")
print("玩家出拳:"+player)
import random
list=["剪刀","石头","布"]
computer=random.choice(list)
print("电脑出拳:"+computer)
if player==computer: if player==computer:
print("平局") print("平局")
elif player=="石头"and computer=="剪刀": elif player=="石头"and computer=="剪刀":
......
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