These solutions are intended for learning and review purposes. If you're preparing for your own practice, try solving the problems yourself before checking the code!
A valid postal code P have to fullfil both below requirements: - P must be a number in the range from 100000 to 999999 inclusive. - P must not contain more than one alternating repetitive digit pair.