Gold Challenge

Repeat the silver challenge, but this time make sure that the formatting above matches what you print to the console. You may need to search the documentation for how to represent special characters in String literals (e.g., how do you represent a newline in a String?). You will also want to look at the documentation for the print() function to use a new parameter called terminator. This parameter defaults to printing a new line after each String logged to the console, but you will want to do something else.

There are many ways to solve this challenge, but one way would be to print a String with a certain number of empty spaces (it is up to you to figure out how many!) when you print specific zip codes.

Get Swift Programming: The Big Nerd Ranch Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.