
APPLE SWIFT PLAYGROUNDS
Quiz by Katherine McCoy
Feel free to use or edit a copy
includes Teacher and Student dashboards
Measure skillsfrom any curriculum
Measure skills
from any curriculum
Tag the questions with any skills you have. Your dashboard will track each student's mastery of each skill.
With a free account, teachers can
- edit the questions
- save a copy for later
- start a class game
- automatically assign follow-up activities based on students’ scores
- assign as homework
- share a link with colleagues
- print as a bubble sheet
9 questions
Show answers
- Q1In Apple Swift Playgrounds, what is the correct syntax to declare a constant?constdefinevarlet30s
- Q2What is the purpose of a 'for-in' loop in Swift?To perform arithmetic operationsTo define a functionTo declare a variableTo iterate over a sequence or collection30s
- Q3Which keyword is used to define a function in Swift?methodfuncdeffunction30s
- Q4What is the correct way to create an empty array in Swift?[]nil(){}30s
- Q5What is the correct syntax to define a class in Swift?objectclasstypestruct30s
- Q6What does the 'self' keyword refer to in Swift?The global scopeA specific methodAn external objectThe current instance of a class or structure30s
- Q7What is the correct syntax to print a message to the console in Swift?display()print()log()output()30s
- Q8What is the correct syntax to add an element to the end of an array in Swift?push()insert()append()add()30s
- Q9What is the purpose of a 'guard' statement in Swift?To define a classTo exit a function, method, or loop if a condition is not metTo perform mathematical calculationsTo declare a variable30s