Advertisement
Spocoman

07. Rounding

Jan 25th, 2022
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. num = input().split()
  2.  
  3. def list_round():
  4.     for i in range(0, len(num)):
  5.         num[i] = round(float(num[i]))
  6.     return num
  7.  
  8. print(list_round())
  9.  
  10.  
  11. Или:
  12.  
  13. num = input().split()
  14.  
  15. def list_round():
  16.     return [round(float(x)) for x in num]
  17.  
  18. print(list_round())
  19.  
  20.  
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement