Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Swift iOS Programming for Kids

You're reading from   Swift iOS Programming for Kids Help your kids build simple and engaging applications with Swift 3.0

Arrow left icon
Product type Paperback
Published in Mar 2017
Publisher Packt
ISBN-13 9781787120747
Length 260 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
 D. Sommer D. Sommer
Author Profile Icon D. Sommer
D. Sommer
 Campagno Campagno
Author Profile Icon Campagno
Campagno
Arrow right icon
View More author details
Toc

Creating our program


You might be wondering when we are supposed to actually start writing some Swift code; it is right now. Let's go straight to the code by typing the following code in the editor of our playground:

print("Hello World")

Tip

All related source code for this chapter can be found here: https://github.com/swift-book-projects/swift-3-programming-for-kids/tree/master/Chapter-3

After writing this code in the editor, the playground should run. You can see this by checking whether the play button at the bottom changes to a stop button, or whether the status at the top shows Running instead of Ready. When the playground is done running, you should be able to see the result of our code in the right column. It should be as shown:

"Hello World\n"

Don't worry about \n being added to your print statement; it is simply Xcode adding it for our convenience. This sequence of characters ( \n ) will be translated into a new line when our application runs. This means that, if we add multiple print...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £13.99/month. Cancel anytime
Visually different images