Coding language that we are using in Playgrounds
Swift
func
What is the correct term for the following operators: "||, &&, !"
Logical Operators
var age = 30
What is a constant?
A type of variable that it's data cannot be changed.
A specific type of syntax that we use for naming our functions and use for commands.
Use this loop when you are specifying the number of times...
For Loop
What does the following code do: gemCounter -= 2
Takes away 2 from the gemCounter.
How do we initialize character in Playgrounds? (Please do not say equals)
let character = Character()
What do we use to tell expert to turnLockUp()?
Dot notation ". "
A term that is defined as "An error in code".
Bug
What is needed to place commands within the function and/or loop?
Curly Braces {}
Assignment Operator
How do we use our variables as conditions?
Using the <, >, !=, or == AND integers.
greenPortal.isActive = false
A term that is used when we place a for loop inside a function.
Nesting
While loop
True or false: You can use logical operators in a while loop (EX: while isOnGem && isBlockedRight)
True.
How can we reassign a variable with a different value?
Using an assignment operator OR increasing/decreasing its value by a certain number using a compound operator/assignment operator.
Provide 3 examples of a condition.
isOnGem, isBlocked, isBlockedRight, isBlockedLeft, isOnOpenSwitch, isOnClosedSwitch,
What is the term we use when you follow proper grammar, punctuation, and rules in coding?
Syntax
What is needed to check if the while loop can run?
Condition (isBlocked, isOnGem, etc.)
What is the correct way to display a compound operator?
+= OR -=
What is the difference between var and let?
A variable can change its value when assigned to, and let is a constant that cannot be changed.
DAILY DOUBLE!
What are the 4 components of a Type?