Not able to print with two decimals : <p>I am solving a problem in hackerrank , and i cannot print a output with two decimal places.</p>

<p>I have tried round(number,2) and -</p>

<pre><code>avg=(toavg[0]+toavg[1]+toavg[2])/3
print(float("{0:.2f}".format((toavg[0]+toavg[1]+toavg[2])/3)))
</code></pre>

<p>I am using python 3.</p>

<pre><code>if __name__ == '__main__':
    n = int(input())
    student_marks = {}
    for _ in range(n):
        name, *line = input().split()
        scores = list(map(float, line))
        student_marks[name] = scores
    query_name = input()
    toavg=student_marks[query_name]
    avg=(toavg[0]+toavg[1]+toavg[2])/3
    print(float("{0:.2f}".format((toavg[0]+toavg[1]+toavg[2])/3)))
</code></pre>

<p>I expected 56.00 or 36.50 but i got 56.0 or 36.5.</p>
