Rounding Up

0

I have the following list of dictionaries and the values correspond to the average value, for example, in the 1st appears 4, but in fact of 4,6666. I would like to know how and what to do, I have already tried the round, but it stays the same.

[{'Nome do Dono': 'Eva', 'Media de Idade': 4}, {'Nome do Dono': 'Ana', 'Media de Idade': 53}, {'Nome do Dono': 'Ada', 'Media de Idade': 12}]
    
asked by anonymous 26.04.2016 / 14:36

1 answer

0
import math
valor = 4.6666
valor_arredondado = math.ceil(valor)
print valor_arredondado # 5.0
    
26.04.2016 / 21:07