Coding language that we are using in Playgrounds
Swift
How do we know when we are defining a function? What is the Code Used
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.
HINT: It has the same name of an animal
camelCase
Use this loop when you are specifying the number of times...
For Loop
What does the following code do: gemCounter = gemCounter + 2
Adds 2 to 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()?
Hint: It goes between the two words
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 {}
What is the correct term for the following operator: ! ?
Not 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
What does the || operator stand for
Or
How can we reassign a variable with a different value?
Hint we do this with the gemCounter
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?
Hint: Starts with an S
Syntax
What is needed to check if the while loop can run?
Condition (isBlocked, isOnGem, etc.)
True or false: You can use logical operators in a while loop (EX: while isOnGem && isBlockedRight)
True.
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 2 components of a Type?
Properties and Methods