import random
total = 0
def cal():
global total
box = random.choice(['石头','黄金','钻石','炸弹'])
if box == '石头':
total = total + 20
elif box == '黄金':
total = total + 100
elif box == '炸弹':
total = total - 200
else:
total = total +500
cal()
print(total)[color=Lime][/color]
import random
total = 0
def cal():
global total
box = random.choice(['石头','黄金','钻石','炸弹'])
if box == '石头':
total = total + 20
elif box == '黄金':
total = total + 100
elif box == '炸弹':
total = total - 200
else:
total = total + 500
cal()
print(total)
import random
total = 0
def cal():
global total
box = random.choice(['石头','黄金','钻石','炸弹'])
if box == '石头':
total = total + 20
elif box == '黄金':
total = total + 100
elif box == '炸弹':
total = total - 200
else:
total = total + 500
cal()
print(total)
import random
total = 0
def cal():
global total
box = random.choice(['石头', '黄金', '钻石','骨头'])
if box == '石头':
total = total + 20
elif box == '黄金':
total = total + 100
elif box == '钻石':
total = total + 500
else:
total = total - 20
cal()
print(total)
def cal():
global total
box = random.choice(['石头', '黄金', '钻石'])
if box == '石头':
total = total + 20
elif box == '黄金':
total = total + 5656
else:
total = total + 234678475784
def cal():
global total
while True:
box = random.choice(['石头','钻石','黄金','狗骨头'])
print(box)
if box == '石头':
total = total + 20
elif box == '钻石':
total = total + 500
elif box == '黄金':
total = total + 100
else:
total = total - 100
print(total)
def cal():
global total
box = random.choice(['石头','黄金','钻石'])
if box =='石头':
total = total +20
elif box =='黄金':
total = total +5656
else :
total = total + 234
print(total)
cal()