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
Fun Friday!

Quiz
•
5th - 8th Grade
30 questions
General Knowledge

Quiz
•
7th - 9th Grade
30 questions
1.01 Functions & Purposes of Business

Quiz
•
6th - 8th Grade
40 questions
Objective Case of Nouns

Quiz
•
5th - 7th Grade
30 questions
Classroom Expectations & Procedures

Quiz
•
7th Grade
32 questions
Self-Control

Quiz
•
6th - 8th Grade
35 questions
Python Basics

Quiz
•
6th - 8th Grade
31 questions
Soal Pilihan Ganda Bahasa Inggris dan Arab

Quiz
•
7th Grade
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
Discover more resources for Other
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
24 questions
Flinn Lab Safety Quiz

Quiz
•
5th - 8th Grade
22 questions
Figurative Language

Quiz
•
7th Grade
10 questions
Essential Lab Safety Practices

Interactive video
•
6th - 10th Grade
30 questions
Lufkin Road Middle School Student Handbook & Policies Assessment

Quiz
•
7th Grade