Advertisement
DeaD_EyE

round_sum

Jul 29th, 2020
1,478
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. def round_sum(*values):
  2.     result = 0
  3.     for value in values:
  4.         multiple, rest = divmod(value, 10)
  5.         if rest:
  6.             multiple += 1
  7.         result += (multiple * 10)
  8.     return result
  9.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement