Sort by

recency

|

3940 Discussions

|

  • + 0 comments

    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() x = sum( student_marks[query_name])/3 print(f"{x:.2f}")

    
    
  • + 0 comments
    avg_marks = sum(student_marks[query_name])/3
    print("{:.2f}".format(avg_marks))
    
  • + 0 comments

    the point of the 'discussions' it´s to discuss the problems and not to show the solution. please post tips and help, not the solution.

  • + 0 comments
    from decimal import Decimal, ROUND_HALF_UP
    
    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()
        
        x = Decimal(str(sum(student_marks[query_name])/3))
        print(x.quantize(Decimal("0.01"), rounding = ROUND_HALF_UP))
    
  • + 0 comments
    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()
        lis=student_marks[query_name]
        average = sum(lis) / len(lis)
        print("{:.2f}".format(average))