wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Flutter Quiz

Total questions: 36

Worksheet time: 27mins

Name
Class
Date
1.

var l = [2,4,6,8];

print(l.index of (2));

what is the output of this code?

a)

0

b)

6

c)

null

d)

8

2.

var l = [2,4,6,8];

print(l.elementAt(2));

what is the output of this code?

a)

6

b)

0

c)

8

d)

null

3.

var l = [2,4,6,8];

print(l.reversed);

what is the output of this code?

a)

(8,6,4,2)

b)

8,4,6,2

c)

[8,4,6,2]

d)

{8,4,6,2}

4.

var l = [2,4,6,8]; l.replaceRange(3, 4, 18);

print(l);

what is the output of this code?

a)

Error

b)

2,4,6,18

c)

2,4,6,8

d)

No OutPut

5.

var l = [2,4,6,8]; l.replaceRange(2, 3, [18]);

print(l[1]);

what is the output of this code?

a)

6

b)

0

c)

4

d)

18

6.

var x =new List(2,2); x=[[2,4],[2,8]] ;

print (x);

what is the output of this code?

a)

[[2,4],[2,8]]

b)

2,4,2,8

c)

[[2,8],[2,4]]

d)

Error

e)

all is wrong

7.

var x =[[2,4,6],[2,8,9]]; print(x[3]);

what is the output of this code?

a)

Error

b)

[2,8,9

c)

6

d)

9

e)

2

8.

var x =[[2,4,6],[2,8,9]]; print(x[0]);

what is the output of this code?

a)

2

b)

Error

c)

[2,2]

d)

[2,4,6]

9.

var x =[[2,4,6],[2,8,9]]; print(x[0][2]);

what is the output of this code?

a)

6

b)

Error

c)

2,9

d)

[2,9]

10.

var y=[2,4,8]; var t={6,4,9};

print(t.intersection(y));

what is the output of this code?

a)

Error

b)

[4]

c)

{4}

d)

4

e)

Null

11.

var n ={2,4,6}; var o={4,8,6};

print(n.difference(o));

what is the output of this code?

a)

{2}

b)

Error

c)

8

d)

NAN

12.

var n ={2,4,6}; var o={4,8,6};

print(o.difference(n));

what is the output of this code?

a)

{8}

b)

2

c)

Error

d)

Null

13.

var p ={[2,4],6,8};print(p);

what is the output of this code?

a)

Error

b)

2,4,6,8

c)

{[2,4],6,8}

d)

{2,4,6,8}

14.

var p ={[2,4],6,8};print(p.elementAt(0));

what is the output of this code?

a)

[2,4]

b)

Error

c)

Null

d)

NAN

15.

var p ={[2,4]}; for (var x in p ){print(x[0]);}

what is the output of this code?

a)

2

b)

Error

c)

Null

d)

NAN

16.

var p ={[2,4],6}; for (var x in p ){print(x[0]);}

what is the output of this code?

a)

Error

b)

[2,4]

c)

Null

d)

2

17.

var m={12,6,8,6,7};print(m.removeAll({6}));

what is the output of this code?

a)

{12,8,7}

b)

Null

c)

Error

d)

NAN

18.

var t ={12,7,9}; t.addAll({15,5,6}); print(t);

what is the output of this code?

a)

{12,7,9,15,5,6}

b)

Error

c)

Null

19.

var m ={15,12,9}; m.addAll({9,7,15}); print(m);

what is the output of this code?

a)

{15,12,9,7}

b)

{15,12,9,9,7,15}

c)

Error

20.

var stud={"ID":1521};

print(user.contiansKey("id"));

what is the output of this code?

a)

True

b)

False

c)

1521

d)

Error

21.

var employee={"Name":"Ali"};

print(employee.clear());

what is the output of this code?

a)

Error

b)

True

c)

{}

d)

False

22.

var user={33 : "ahmed"}; user["Name"]="33";

print(user.contiansKey("33"));

a)

True

b)

Error

c)

ahmed

d)

False

23.

var car ={id="2525"};

print(car.contiansKey(id));

a)

True

b)

2525

c)

False

d)

Error

24.

const x; x=10;

print(x);

what is the output of this code?

a)

Error

b)

10

c)

Null

d)

NAN

25.

var p ={1,4,8,7};p.remove({1,8});

print(p);

What is the output of this code?

a)

{1, 4, 8, 7}

b)

{4,7}

c)

{0,4,0,7}

d)

Error

26.

main(){ h1(); }

h1() =>"hi"+"text";

What is the output of this code?

a)

hi text

b)

hi

c)

Null

d)

Error

e)

No Output

27.

main(){ sum(2,5,2); }

int sum ({x,y,z}) {print(x+y+z);}

What is the output of this code?

a)

9

b)

Null

c)

x+y+z

d)

Error

28.

main() { sum(x:2,z:"5",y:8); }

sum ({x,y,String z}) {print(x+y);}

What is the output of this code?

a)

Error

b)

Null

c)

10

29.

can we pass to a function an argument string list only?

a)

True

b)

False

30.

main(){ print(div(12,3) );}

var div = (x,y)=>x/y;

What is the output of this code?

a)

Error

b)

Null

c)

4

d)

None From Above

31.

can we pass a function as an argument in another function?

a)

True

b)

False

32.

is there an error in making a function inside class?

a)

yes there is an error

b)

no there is no error

33.

can we make a function inside a class its name same as the class name?

a)

True

b)

False

34.

can we put a lamda function in variable?

a)

True

b)

False

35.

line 1 main()

line 2 { human h1=new human();

line 3 human h2=human();}

line 4 class human{var name;}

Is there an error?

a)

Yes at line 3

b)

Yes at line 4

c)

Yes at line 2

d)

No Error

36.

var l = [2,4,6,8]; l.replaceRange(3, 4, [18]);

print(l);

What is the Output of this code?

a)

[2, 4, 6, 18]

b)

Error

c)

[2,4,6,8,18]