Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python rounding

def round(num):
  remainder = num - int(num)
  
  if remainder >= 0.5:
    return int(num) + 1
  return int(num)
Source by softhunt.net #
 
PREVIOUS NEXT
Tagged: #python #rounding
ADD COMMENT
Topic
Name
2+5 =