Lab 1 - Swift Basics

Github Classroom Link

Setup & Github Classroom

To complete this lab, you need to have an Apple computer and Xcode downloaded from the App Store. Please do not download Xcode off the internet, or attempt to complete this class without an Apple computer. It will be very difficult for us to support you in either case.

After downloading Xcode, accept the assignment from the Github Classroom link above. This will create a repository for you, and give you the link. In Terminal, navigate to the location where you want to place the assignment and run git clone. Double-click on the Lab1.playground file and it should open in Xcode.

Xcode Playgrounds

Xcode playgrounds are a very limited environment to test and execute small portions of Swift code. To run code in an Xcode playground, mouse over the line numbers on the left side of the code editor, and press the play button on the last line of code you want to run.

As you complete the lab, uncomment the test corresponding to the finished problem, and press the play button next to the last uncommented test. If the test passes, Xcode will give you no visual indication. If your solution is incorrect, a red error will appear on the line of the test that has failed.

Committing and Submission

You should commit and push your code often to avoid losing code or breaking a working solution. To commit and push your code, navigate to your working directory and run the following commands:

git add .

git commit -m "YOUR MESSAGE HERE"

git push

Once you finish the lab, make sure to commit and push. You do not have to worry about any further steps, we will grade your final commit.

Grading

Labs are graded on effort. If you have any questions, or find yourself spending large amounts of time on a lab, please make a private post on Piazza. We will provide you with all the support you need.

Due Date

This lab is due September 20 at 11:59pm. If you have extenuating circumstances, are feeling overwhelmed, etc. please let us know. We will grant any and all extension requests.