LearnPy Hub
← Decorators problems
Medium

Round the Result

Write a decorator factory round_to(k) that rounds a function's float result to k decimals. Decorate average(nums) with @round_to(2). Read numbers and print the average.

Input

One line.

Output

One number.

Sample 1

Input
1 2 2
Output
1.67

Sample 2

Input
10
Output
10.0
solution.py
Output appears here
Round the Result · Python practice problem · LearnPy Hub