Kotlin quiz 3

Kotlin quiz 3

Professional Development

19 Qs

quiz-placeholder

Similar activities

Unit 1 lesson 1

Unit 1 lesson 1

University - Professional Development

15 Qs

Iphone Quiz [UPDATE]

Iphone Quiz [UPDATE]

5th Grade - Professional Development

20 Qs

Level 2 Digital Technologies

Level 2 Digital Technologies

8th Grade - Professional Development

18 Qs

Microsoft Office Advandces 2016

Microsoft Office Advandces 2016

9th Grade - Professional Development

20 Qs

Lección1 - JavaScript

Lección1 - JavaScript

1st Grade - Professional Development

17 Qs

SIMKOM

SIMKOM

12th Grade - Professional Development

15 Qs

OS Ch8_2

OS Ch8_2

12th Grade - Professional Development

17 Qs

Sec+ CH.2 Review Test

Sec+ CH.2 Review Test

Professional Development

15 Qs

Kotlin quiz 3

Kotlin quiz 3

Assessment

Quiz

Computers

Professional Development

Practice Problem

Medium

Created by

Mohamed Gamal

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

19 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which one is wrong?

var l = [2,4]

val l = List(2,4)

val l = listOf(2,4)

val l = listOf[2,4]

2.

FILL IN THE BLANK QUESTION

1 min • 1 pt

val l = listOf(2,4,6,8)

println(l.indexOf(2))

What is the output?

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

var l = listOf(2,4,6,8)

println(l.asReversed())

What is the output?

(4,2,8,6)

(6,4,2,8)

(8,6,4,2)

(8,2,6,4)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

val list = mutableListOf(1,2,4,5)

list[0] = 50

println(list[0])

1

50

error

indexOutOfBoundException

5.

FILL IN THE BLANK QUESTION

1 min • 1 pt

val list = listOf(2,4,6,8)

list.add(200)

println(list)

Do not use any braces

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

val list = mutableListOf(1,2,3,4,5)

list.add(2,9)

println(list)

[1, 2, 9, 4, 5]

error

[1, 2, 9, 3, 4, 5]

[1, 9, 3, 4, 5]

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

val set1 = setOf(1,2,3)

val set2 = setOf(2,3,4)

println(set1.intersect(set2))

2,3

null

[2,3]

[1,2,3]

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?