human
Round the given number to nearest multiple of 10 | Function to round the number to the nearest number having one 's digit 0.
Last character is 0 then return the original string.
If last character is 1 or 2 or 3 or 4 or 5 make it 0.
Process carry.
Return final string.
Driver code.
Function call"
Solution in Python:
 Can you provide a code to round the given number to nearest multiple of 10 and the other steps required?
assistant
#Here is code to round the given number to nearest multiple of 10 and the other steps required.
 def Round ( s , n ) :
	s = list ( s )
	c = s . copy ( )
	if ( c [ n - 1 ] == '0' ) :
		return ( " " . join ( s ) )
	elif ( c [ n - 1 ] == '1' or c [ n - 1 ] == '2' or c [ n - 1 ] == '3' or c [ n - 1 ] == '4' or c [ n - 1 ] == '5' ) :
		c [ n - 1 ] = '0'
		return ( " " . join ( c ) )
	else :
		c [ n - 1 ] = '0'
		for i in range ( n - 2 , - 1 , - 1 ) :
			if ( c [ i ] == '9' ) :
				c [ i ] = '0'
			else :
				t = ord ( c [ i ] ) - ord ( '0' ) + 1
				c [ i ] = chr ( 48 + t )
				break
	s1 = " " . join ( c )
	if ( s1 [ 0 ] == '0' ) :
		s1 = "1" + s1
	return s1
s = "5748965412485599999874589965999"
n = len ( s )
print ( Round ( s , n ) )