Commit 120b8c0b by BellCodeEditor

save project

parent 848a426b
Showing with 28 additions and 24 deletions
from random import *
from random import *
from random import *
player=str(input())
player=str(input('玩家请出拳:'))
list1=['剪刀','石头','布']
print('玩家出拳:',player)
computer=choice(list1)
if player=='剪刀':
if computer=='剪刀':
print('impossble!')
elif computer=='石头':
print('computer!')
if player in list1:
print('玩家出拳:',player)
computer=choice(list1)
print('计算机出拳:',computer)
if player=='剪刀':
if computer=='剪刀':
print('impossble!')
elif computer=='石头':
print('computer!')
else:
print('player!')
elif player=='石头':
if computer=='石头':
print('impossble!')
elif computer=='剪刀':
print('player!')
else:
print('computer!')
else:
print('player!')
elif player=='石头':
if computer=='石头':
print('impossble!')
elif computer=='剪刀':
print('player!')
else:
print('computer!')
if computer=='石头':
print('player!')
elif computer=='剪刀':
print('computer!')
else:
print('impossble!')
else:
if computer=='石头':
print('player!')
elif computer='剪刀':
print('computer!')
else:
print('impossble!')
\ No newline at end of file
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