Skip to content

Instantly share code, notes, and snippets.

@shamlikt
Created September 23, 2015 10:57
Show Gist options
  • Save shamlikt/592265aa12c6dfaeef3c to your computer and use it in GitHub Desktop.
Save shamlikt/592265aa12c6dfaeef3c to your computer and use it in GitHub Desktop.
I got a qustion to Round floating number without using any function. this is two line script to do that
a=input('Number to RoundUp: ')
print str((int(str(a).split('.')[1])/10.0+.5)+int(str(a).split('.')[0])).split('.')[0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment