#import module
import random
#Set Default Value
Dia_Value=0.05
L4_Stone_Gold=0
#Get L1_stone_Gold
L1_Gold=0.75
L1_Dia_Gold=8Dia_Value
L1_Stone_Gold=L1_Gold+L1_Dia_Gold
print(‘L1=’,L1_Stone_Gold)
#Get L3_stone_Gold
L3_Gold=0.39
L3_Strength_Gold=10
L3_Stone_Gold=(L1_Stone_Gold13)+L3_Gold+L3_Strength_Gold
print(‘L3=’,L3_Stone_Gold)
#Func L4_stone_Gold(averge_probability)
def L4SGold(L4_Stone_Gold, L1_Stone_Gold,L3_Stone_Gold):
Rand = random.random()
if Rand <= 0.4878:
L4_Gold=0.897
L4_Strength_Gold=10
L4_Stone_Gold+=((L1_Stone_Gold16)+L4_Gold+L4_Strength_Gold+L3_Stone_Gold)
Result=L4_Stone_Gold
print(‘success’)
print(Result)
return Result
else:
L4_Fail_Gold=0.897
L4_Stone_Gold+=((L1_Stone_Gold16)+L4_Fail_Gold)
print(‘fail’)
print(L4_Stone_Gold)
return (L4SGold(L4_Stone_Gold, L1_Stone_Gold, L3_Stone_Gold))
AllGold=0
for i in range(0,13):
AllGold+=L4SGold(L4_Stone_Gold, L1_Stone_Gold,L3_Stone_Gold)
print (i)
AllGold+=(19.75+10)
print(‘output’,AllGold)