
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
FInal Term Plus
Quiz
•
12th Grade - University
15 questions
Quiz on the Solar System
Quiz
•
6th Grade - University
10 questions
Graphical Presentation of Data
Quiz
•
University
10 questions
CURRENT AFFAIRS
Quiz
•
12th Grade - Professi...
15 questions
Day 2 Nobelis NEEV Basics of Diabetes and Guidelines
Quiz
•
University
14 questions
Radiation Basic Concepts
Quiz
•
University
13 questions
Water Resource Management - OAA quiz
Quiz
•
University
10 questions
Photography Quiz
Quiz
•
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