def cal():
global total
box=random.choice(['石头','黄金','钻石','炸弹'])
if box == '石头'
total = total + 20
elif box == '黄金':
total = total + 100
elif box == '炸弹':
total = total - 20
else:
total = total + 500
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
def cal():
global total
box = random.choice(['石','金','钻','炸'])
print(box)
if box == '石':
total = total + 20
elif box == '金':
total = total + 100
elif box == '炸':
total = total - 200
else:
total = total + 500
def cal():
global total
box = random.choice(["a","s","d","TNT"])
if box=="a":
total = total+30
elif box=="s":
total = total+110
elif box == "TNT":
total = total-200
import random
total = 0
def cal():
global total
box = random.choice(['石头','黄金','钻石'])
if box == '石头':
total = total+20
elif box == '黄金':
total = total+100
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-200
import random
total=0
def cal():
global total
box = random.choice(['石头','黄金','钻石','炸弹'])
if box = '石头':
total = total+20
elif box = '炸弹':
total=total-200
elif box='黄金':
total = total+100
else:
total = total+500
import random
total = 0
def cal():
global total
box = random.choice(['石头','黄金','TNT','钻石'])
if box == '石头':
total = total+20
elif box == '黄金':
total = total+100
elif box == 'TNT':
total = total-200
else:
total = total+500
cal()
print(total)
def cal():
global total
box=random.choice(['石头','黄金','钻石','炸弹'])
if box == '石头'
total = total + 20
elif box == '黄金':
total = total + 100
elif box == '炸弹':
total = total - 20
else:
total = total + 500