"""斗地主积分"""
print("***欢迎来到斗地主积分程序***")
A = input("第一个人的名字")
B = input("第二个人的名字")
C = input("第三个人的名字")
a = 0
b = 0
c = 0
while True:
dizhu = input("谁是地主?")
yingjia = input("哪个人赢了?")
y = input("几炸?")
zhadancishu = int(y) + 1
x = pow(2,zhadancishu)
score = int(x)
print(score,"分")
if yingjia == dizhu:
if dizhu == A:
a = a + score
b = b - score/2
c = c - score/2
elif dizhu == B:
b = b + score
a = a - score/2
c = c - score/2
elif dizhu == C:
c = c + score
b = b - score/2
a = a - score/2
if yingjia == A and A != dizhu:
a = a + score/2
if B != dizhu:
b = b + score/2
c = c - score
if C != dizhu:
c = c + score/2
b = b - score
if yingjia == B and B != dizhu:
b = b + score/2
if A != dizhu:
a = a + score/2
c = c - score
if C != dizhu:
c = c + score/2
a = a - score
if yingjia == C and C != dizhu:
c = c + score/2
if A != dizhu:
a = a + score/2
b = b - score
if B != dizhu:
b = b + score/2
a = a - score
print(A,"=",a,B,"=",b,C,"=",c)
temp = input("输入0确认无误")
t = int(temp)
if t == 0:
a = a
b = b
c = c
else:
j = input("第一个人的分数")
a = int(j)
k = input("第二个人的分数")
b = int(k)
l = input("第三个人的分数")
c = int(l)
print("\n")
程序效果