Commit 6b304cd0 by BellCodeEditor

save project

parent fe8556fe
Showing with 9 additions and 5 deletions
...@@ -5,9 +5,12 @@ while True: ...@@ -5,9 +5,12 @@ while True:
LDD=random.choice(list) LDD=random.choice(list)
print('人机出拳:'+LDD) print('人机出拳:'+LDD)
print('真人出拳:'+plaryer) print('真人出拳:'+plaryer)
if plaryer==LDD: if plaryer in list:
print('平局') if plaryer==LDD:
elif (LDD=='石头'and LDD=='布')or(LDD=='剪刀'and LDD=='石头')or(LDD=='布'and LDD=='剪刀'): print('平局')
print('你赢了') elif (LDD=='石头'and LDD=='布')or(LDD=='剪刀'and LDD=='石头')or(LDD=='布'and LDD=='剪刀'):
print('你赢了')
else:
print('你输了')
else: else:
print('你输了') 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