'''
if 条件1:
条件成立代码1
elif 条件2:
条件成立代码2
else:
条件都不成立代码
'''
import random
name = 'lisi'
passwd = '1234'
user = input('请输入用户:')
password = input('请输入密码:')
# if name == user:
# if password == passwd:
# print('欢迎master')
# else:
# print('密码错误')
# else:
# print('你不是我的master')
if name == user and password == passwd:
print(''' 欢迎master
#######################################
我们开始玩游戏石头剪刀布
#######################################''')
play = int(input('''
请出拳:
0--石头
1--剪刀
2--布
:'''))
computer = int(random.randint(0,2))
print(computer)
if ((play == 0) and (computer == 1)) or ((play ==1) and (computer ==2)) or ((play==2) and (computer==0)):
print("恭喜玩家获胜%s-%s" % (play,computer))
elif play == computer:
print('平局,别走再来嘛%s-%s' % (play,computer))
else:
print('很可惜,你输了%s-%s' % (play,computer))
else:
print('你不是我的master')