Where is the address? 19/100 Days of Code
Before my program could format the addresses, it first had to determine the zip code was formatted properly.
To ensure the zip code entered was in the right format, the program now returns the zip code if it is not 8 characters long. This works for all zip codes since they should be in the format SS ZZZZZ.
The next part of the program checks whether or not the zip code entered is in the list. For now, if the address is found, the program prints a simple statement to log a successful execution.
The program uses a series of nested if statements to confirm the existence of an address with a matching zip code.
In the trailing else, if the zipcode is not found in the list, it is returned in the format SS: ZZZZZ:/
Everything looks good so far. Tomorrow I’ll continue with a story about a weird error I got while coding the if statements.