Answer:
The program in Python is as follows:
zipp = int(input("Zip Code: "))
while (zipp > 89049 or zipp < 501):
print("Bad zip code")
zipp = int(input("Zip Code: "))
print("Thank you")
Step-by-step explanation:
This gets input for the zip code [The given first line is missing from the question. So I had to put mine]
zipp = int(input("Zip Code: "))
This loop is repeated until the user enters a zip code between 501 and 89049 (inclusive)
while (zipp > 89049 or zipp < 501):
This prints bad zip code
print("Bad zip code")
This gets input for another zip code
zipp = int(input("Zip Code: "))
This prints thank you when the loop is exited (i.e. when a valid zip code is entered)
print("Thank you")