Не могу понять, как округлить мои окончательные выходные данные кортежа до 2 десятичных знаков. Какие-либо предложения??? Что у меня есть для моего кода:
import random
random.randint(0,10)
def a():
counter=0
result=[]
total_score = 0
while(counter<10000):
i = random.randint(0,10)
while i not in [1,2,3]:
if i in [4,5,6]:
total_score = total_score + i
i=random.randint(0,10)
elif i in [7,8,9,10]:
total_score = total_score + i*2
i=random.randint(0,10)
else:
total_score = total_score/2
i=random.randint(0,10)
counter += 1
result.append(total_score)
a=sum(result)/len(result)
b=max(result)
return(a,b)
print(a())