Condition to check if the number is divided by 2 , 3 , or 5
if ( n % 2 == 0 ) : NEW_LINE INDENT return ( isUgly ( n // 2 ) ) NEW_LINE DEDENT if ( n % 3 == 0 ) : NEW_LINE INDENT return ( isUgly ( n // 3 ) ) NEW_LINE DEDENT if ( n % 5 == 0 ) : NEW_LINE INDENT return ( isUgly ( n // 5 ) ) NEW_LINE DEDENT return 0 NEW_LINE