Created
September 23, 2015 10:57
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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