GET THIS SWIFT COURSE FOR FREE:

In this session, we will be talking about Swift programming and you’ll learn:

What’s programming and programming language?

+ Data type in Swift
+ Variable
+ Operator
+ Statement and comments

GET THIS SWIFT COURSE FOR FREE:

Your Code Challenge:

Give this a try! I would say give it at least 60 minutes of your time if you are completely new to programming!

Here’s your Code Challenge for today:

+ We will be create a little bookstore bill calculator. Create a new playground for this Code Challenge. Name it 7DSC-Day1-BillCalculator

+ Create three variables for these three books which I really love: The Martian, The 4 Hour Work Week, Blue Ocean Strategy.

+ Remember that you will need to use lower camel casing justLikeThis to name variables. Initialize these variables with the value of 9.54, 19.5, 15.8 respectively.

+ Create a variable called total, calculate the total amount of these book prices.

+ Create a variable called tax percentage with an initial value of 10.0 — what is its data type?

+ Create a variable called tax amount to calculate the amount of tax that we will have to pay for this book. — do the calculation to have its value immediately.

+ Create a variable called shipping cost with the value of 4.99 — what is its data type?

+ And finally, create the last variable called total bill and calculate the total amount we have to pay for these three books.

+ While you’re doing this, remember three things:
(1) Always name your variables using lowerCamelCasing.
(2) Ask and answer yourself what is its data type and make a comment like // Double next to the variable.
(3) Have fun doing this! Learning and creating something that matters should be fun, right? Life is too short!

+ Don’t give up. Try for at least 60 minutes before watch my solution video.

+ And yeah, do watch the solution video because I’ll share some other awesome nuggets of Swift programming that we don’t talk in the demo.

+ Finally, share your Code Challenge below this video with me! Can’t wait to see what you create!

+ Have fun and good luck,

– Duc

Love even more advanced and in-depth training with me? Join Total iOS Blueprint 2 where I share with you how to build 11 iOS apps from scratch with awesome video tutorials just like these.

GET THIS SWIFT COURSE FOR FREE:

********************************
*** ABOUT CODE MASTERY ***
********************************
Code Mastery is hosted by Duc Tran, founder of Developers Academy.

This is his free-style no notes, no teleprompter presentation and live coding broadcast with you guys everyday.

To join Duc’s free courses, register for free at

*************************
*** MEET DUC TRAN ***
*************************

Duc Tran is founder of Developers Academy, one of the world’s leading iOS, Android and Web development trainers.

More than 2,000,000 developers have studied his video trainings; 100,000 developers see his posts each month. Each year, Duc has helped 20,000 plus developers gratudate from his online courses or video series.

*************************************************
*** FREE TRAININGS IN IOS DEVELOPMENT ***
*************************************************
To subscribe and get free tutorials, courses and weekly content, visit me at:
Connect with Duc on facebook:
Tweet him:
Get daily inspiration: