Conditional statements are if-then statements, and are the backbone of programming logic. This video walks through what conditionals are, what they look like in code, and some basic conditional operators.
- [Instructor] The next building block of programming…that I want to talk about is conditional statements.…So what is a conditional?…Well a conditional statement is an if/then statement.…Think of a video game where a player…gets an extra life if their score…is greater than 50,000 points.…So you have the if part, if the score is…greater than 50,000, and then you have the then part,…then the player gets an extra life.…So they contain a condition that is evaluated…as true or false and then a block of code,…kind of like a method, that is executed…only if the condition is true.…
When you create a conditional statement,…there are several things that you need to do.…You start with the if keyword, and then you have…a true or false condition contained within parentheses.…So you'd have, in our hypothetical game,…if, and then in parentheses, score, a greater than sign,…and then the number 50,000.…If the score variable is greater than 50,000.…From there, you're going to have curly braces…that contain the code that runs if the statement…
- Installing Xcode
- Creating an Xcode project
- Configuring the iOS Simulator
- Understanding variables
- Connecting visual objects to variables
- Understanding methods
- Connecting a button to a method
- Using conditional statements
- Setting up the user interface (UI)
- Building a complete iOS app
Skill Level Beginner
1. Set Up Your Coding Environment
Create an Xcode project4m 19s
2. Programming Building Blocks: Variables
3. Programming Building Blocks: Methods
4. Programming Building Blocks: Conditional Statements
5. Plan and Prepare the App
6. Build a Full Application
Next steps3m 11s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.