
Lesson Variables
Presentation
•
Computers
•
9th Grade
•
Practice Problem
•
Medium
Laila Zuaiter
Used 19+ times
FREE Resource
7 Slides • 8 Questions
1
variables
Swiftplayground
Week 2
Computer Science - CSC400
2
Objectives
Define variables as a value that can change, depending on conditions or on information passed to the program under the Swift programming platform.
Identify different types of variables used to store data in Swift programming platform and the way to parse data between them.
Declare a variable and assign a value to it using the Swift programming platform syntax to hold a specific data within a program
3
Objectives
Declare Constants using let command in Swift Programming platform to hold a non-changing variable value.
Use the assignment operator (=) to assign a new value to a variable in a program that matches its defined data type
Identify the scope of the local variables in a programming as an indication of how accessible a variable is to a function or another call within the same program.
Perform arithmetic, increment, decrement, comparison between variables and logical operators to perform different operations on variables
4
Define variable
Variable : A named container that stores a value. The value can change over time.
5
Multiple Choice
Which of the following is the correct definition of a variable?
A function that performs calculations
A storage location in memory with a specific name
A type of loop that repeats actions
A collection of data items
6
Types of variable
let name = "Ahmad". // String
var age = 15 // Integer
var height = 1.6 // float
var isOnClosedSwitch = true //Boolean
7
Multiple Choice
Which of the following types is a String?
let name = "Sara"
var age = 15
let speed = 80.5
var isBlocked = false
8
Multiple Choice
Which of the following types is a float?
let name = "Sara"
var age = 15
let speed = 80.5
var isBlocked = false
9
Multiple Choice
Which of the following types is a boolean?
let name = "Sara"
var age = 15
let speed = 80.5
var isBlocked = false
10
Multiple Choice
Which of the following types is an integer?
let name = "Sara"
var age = 15
let speed = 80.5
var isBlocked = false
11
Declare a constant
Constant: A named Container that stores a value that can't be changed
example:
let name = "Amna"
Variable : a variable that can be modified later
example :
var EnglishMark = 90
12
Multiple Choice
In Swift programming, what keyword is used to declare a variable that can be modified later?
const
var
let
mut
13
Multiple Choice
How do you declare a constant in Swift?
constant myValue = 10
static myValue = 10
let myValue = 10
final myValue = 10
14
Swift playground
Solve Swift playground :
Keeping Track
Bump up the Value
Incrementing the Value
15
Open Ended
Search on the internet and write what are the rules of Naming variable?
variables
Swiftplayground
Week 2
Computer Science - CSC400
Show answer
Auto Play
Slide 1 / 15
SLIDE
Similar Resources on Wayground
11 questions
1.3 Day 1 Solving Eq. with Variable on both Sides
Presentation
•
9th Grade
11 questions
Sofware y Hardware
Presentation
•
10th Grade
10 questions
DESAFIO_PROVAPR_9_EF_HIST_003
Presentation
•
9th Grade
10 questions
LECCIÓN - LOS INCAS
Presentation
•
9th Grade
11 questions
Linear Equation in two variable
Presentation
•
9th Grade
11 questions
Teenager 5 Session 22: Pronunciation & Speaking
Presentation
•
KG
11 questions
Google Sheets Basics lesson
Presentation
•
9th Grade
11 questions
Português SAEB_9ano
Presentation
•
9th Grade
Popular Resources on Wayground
20 questions
"What is the question asking??" Grades 3-5
Quiz
•
1st - 5th Grade
20 questions
“What is the question asking??” Grades 6-8
Quiz
•
6th - 8th Grade
10 questions
Fire Safety Quiz
Quiz
•
12th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
34 questions
STAAR Review 6th - 8th grade Reading Part 1
Quiz
•
6th - 8th Grade
20 questions
“What is the question asking??” English I-II
Quiz
•
9th - 12th Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
47 questions
8th Grade Reading STAAR Ultimate Review!
Quiz
•
8th Grade
Discover more resources for Computers
20 questions
“What is the question asking??” English I-II
Quiz
•
9th - 12th Grade
10 questions
Fire Prevention
Quiz
•
9th - 12th Grade
24 questions
BIOLOGY STAAR REVIEW
Quiz
•
9th Grade
20 questions
Graphing Inequalities on a Number Line
Quiz
•
6th - 9th Grade
30 questions
English 1 STAAR Review
Quiz
•
9th Grade
46 questions
Linear and Exponential Function Key Features
Quiz
•
9th Grade
20 questions
Grammar
Quiz
•
9th - 12th Grade
30 questions
Biology STAAR Review #3
Quiz
•
9th Grade