Search Header Logo

kotlin Quiz 2

Authored by Mohamed Gamal

Computers

University

Used 2+ times

kotlin Quiz 2
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

val x = 10

x.inc()

println(x)

11

9

10

15

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

val num = 5

num.pow(2)

10

25

Error

55

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

from what we can read input from user?

cin>>

stdin.readlinesync()

Scanner(System.in).next()

Scanner(System.`in`).next()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

val text="TeXt";

println(text.uppercase());

what is the output?

text

tExT

TEXT

TeXt

5.

FILL IN THE BLANKS QUESTION

1 min • 1 pt

var text="TeXt";

print("text.tolowercase()");

what is the output?

(a)  

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

val text="a-b-c-d";

print(text.split("-"));

abcd

a b c d

[a, b, c, d]

7.

FILL IN THE BLANKS QUESTION

1 min • 1 pt

var text=" a b c d ";

print("text.trim()");

(a)  

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

Already have an account?