
Swift Kotlin Grammar Tests
Authored by Symbat Nurgaliyeva
Science
University
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
11 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following syntaxes is correct for creating a constant in Swift?
let constantName = "Value"
const constantName = "Value"
var constantName = "Value"
constant constantName = "Value"
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How to declare an immutable variable in Kotlin?
const val variableName = "Value"
let variableName = "Value"
var variableName = "Value"
val variableName = "Value"
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which operator is used to check for null values in Kotlin?
== null
=== null
?.
!!
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of executing the expression "Hello".count() in Swift?
Compilation error
5
6
"Hello"
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How to create a method in a class in Kotlin?
fun methodName() {}
method methodName() {}
def methodName() {}
function methodName() {}
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following syntaxes in Swift is used to declare an optional type?
var name: String?
var name: Optional(String)
var name: String!
var name: Optional<String>
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the !! operator mean in Kotlin?
Converts a nullable type to a non-nullable type, throwing an exception if null
Returns null
Checks the value for null
Sets a default value
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
MIX-quiz
Quiz
•
University
10 questions
Gas Turbine Compressor
Quiz
•
University
10 questions
Moon Phases
Quiz
•
University
9 questions
FLOWERS
Quiz
•
University
15 questions
Kuis Lamun/Seagrass
Quiz
•
University
10 questions
Chandrayaan - 3 Quiz
Quiz
•
University
16 questions
Darcy Trivia 2024
Quiz
•
University
15 questions
Understanding Greenhouse Effect
Quiz
•
6th Grade - University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade