top of page

SWIFT FOR VCE SOFTWARE DEVELOPMENT

2. Maths Operators and Data Types in Swift

Updated: Feb 18, 2019

An introduction to Maths Operators and Data Types in Swift


This is a short tutorial on how to implements basic maths operators with the various data types in swift


Variables and Constants:

As you did the video you will have noticed we have declared Variables and Constants.


A variable is stored in memory and is a reserved space that holds data. This data can be changed, hence the name Variable. In swift we use var


A constant is data that is stored that does not change. In Swift we use let


Task:

Add a new button for multiplication, divide and subtract and make your app output to the same label. Hint: You might need to adjust the data types to get them all to work as expected.





Comments


bottom of page