Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/local/bin/python3.7
- # -*- coding: utf-8 -*import
- records = {}
- for _ in range(int(input())):
- (name, grade) = input().split(" ")
- if name not in records:
- records[name] = []
- records[name].append(f'{float(grade):.2f}')
- for key, value in records.items():
- print(f'{key} -> {" ".join(value)} (avg: {(sum(map(float, value)) / len(value)):.2f})')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement