Swift Playgrounds Test

Quiz
•
Other
•
7th Grade
•
Hard

Victor Conde
Used 2+ times
FREE Resource
35 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of the following code? let a = 5 let b = 3 let c = a + b
8
Error
53
15
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to declare a function in Swift?
def myFunction()
function myFunction()
func myFunction()
void myFunction()
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the break statement in a loop?
To restart the loop from the beginning
To continue executing the loop
To skip the current iteration and move to the next
To end the loop immediately
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of the following code? let x = 10 let y = 5 if x > y { print("x is greater than y") } else { print("x is less than or equal to y") }
None of the above
Error
x is less than or equal to y
x is greater than y
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the return keyword in a function?
To specify the output of the function
To end the execution of the function
To indicate that the function has completed successfully
All of the above
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of the following code? let a = 10 let b = 20 let c = a * b
200
30
Error
300
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the continue keyword in a loop?
To skip the current iteration and move to the next
To end the loop immediately
To restart the loop from the beginning
To continue executing the loop
Create a free account and access millions of resources
Similar Resources on Wayground
40 questions
Unit 2

Quiz
•
6th - 9th Grade
30 questions
Show What You Know

Quiz
•
6th - 8th Grade
33 questions
ESL class

Quiz
•
KG - 10th Grade
33 questions
Christmas Carols 6th

Quiz
•
6th - 8th Grade
30 questions
2024-2025

Quiz
•
3rd Grade - University
33 questions
Champagnat Day Quiz

Quiz
•
4th - 8th Grade
37 questions
FACS Final Exam Review

Quiz
•
6th - 8th Grade
40 questions
Fun Friday

Quiz
•
7th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Other
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
20 questions
Multiplying and Dividing Integers

Quiz
•
7th Grade
20 questions
Getting to know YOU icebreaker activity!

Quiz
•
6th - 12th Grade
20 questions
Perfect Squares and Square Roots

Quiz
•
7th Grade
10 questions
Understanding the Scientific Method

Interactive video
•
5th - 8th Grade