Writing Your First Swift Program

S101, 10 minutes

This tutorial shows you how to run a basic Swift program in Xcode. At the end of the lesson, you should be able to do the following:

  • Launch¬†Xcode and create a Swift project
  • Running¬†a project that print a statement
  • Modifying the print statement
  • Adding comments to code

 

Exercise

  1. Change the println statement to greet yourself.
  2. Modify the program to print 3 greeting statements.
  3. Add a comment to describe the program.