Skip to content

gtiosclub/bootcamp-module-1

Repository files navigation

← Module 0Module 2 →

Module 1: Swift Basics

What you'll accomplish

  • Initialize variables and constants, using implicit and explicit notations.
  • Perform algebraic operations using Swift operators.
  • Perform String operations.
  • Implement conditional statements using logical operators.
  • Referencing optionals.
  • Safely unwrap optionals.

Getting Started

Clone this repo to your local device.

Refer to the Assignments notion page on how to do so.

Once you've cloned the repo, open the CarsApp project using Xcode if you haven't already.

Content

Variables and Data Types

This section of the assignment will serve as a warm-up to help you get comfortable with Swift's variable and type declaration syntax. By the end, you should be able to distinguish between different data types as well as variables and constants.

  • Initialize variables and constants, using implicit and explicit notations.

Operators

Here, you'll be asked to fulfill certain prompts that require the use of operators. Operators can be used to perform algebraic operations with numbers, or even combine strings. Since you'll be using them a lot during your iOS journey, we suggest getting familiar with them.

  • Perform algebraic operations using Swift operators.
  • Perform String operations.

Conditionals

Conditionals let us execute code conditionally. They allow us to make decisions in our code when the state of our application isn't clear. All modern languages offer conditional statements, so you may already have experience. This section should push you to learn about the syntax of conditional statements in Swift, and usage of logical operators with conditionals.

  • Implement conditional statements using logical operators.

Optionals

You will find this section much more challenging than the preceding ones. This is because Optionals are a fairly unique feature of Swift, they add a protection layer to nil (also known as null in Java, and None in Python). With Optionals, we can write more type-safe code and express values of data types like Strings, Ints, etc. more clearly.

  • Referencing optionals.
  • Safely unwrap optionals.

Submission

Check the Assignments notion page for submission instructions!

If you are having trouble, feel free to reach out via Discord.

Releases

No releases published

Packages

No packages published

Languages