Program to find remainder when large number is divided by 11 | Function to return remainder ; len is variable to store the length of number string . ; loop that find remainder ; Driver code
def remainder ( st ) : NEW_LINE INDENT ln = len ( st ) NEW_LINE rem = 0 NEW_LINE for i in range ( 0 , ln ) : NEW_LINE INDENT num = rem * 10 + ( int ) ( st [ i ] ) NEW_LINE rem = num % 11 NEW_LINE DEDENT return rem NEW_LINE DEDENT st = "3435346456547566345436457867978" NEW_LINE print ( remainder ( st ) ) NEW_LINE