Function to calculate power
def power ( a , b ) : NEW_LINE INDENT if ( b == 0 ) : NEW_LINE INDENT return 1 ; NEW_LINE DEDENT if ( b == 1 ) : NEW_LINE INDENT return a ; NEW_LINE DEDENT tmp = power ( a , b // 2 ) ; NEW_LINE result = tmp * tmp ; NEW_LINE if ( b % 2 == 1 ) : NEW_LINE INDENT result *= a ; NEW_LINE DEDENT return result ; NEW_LINE DEDENT