wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Flutter intro and Dart quiz

Total questions: 15

Worksheet time: 12mins

Name
Class
Date
1.

What is a variable in Dart?

a)

A place to store a value

b)

A type of function

c)

A type of class

d)

A reserved keyword

2.

How do you declare a variable in Dart?

a)

variable variableName;

b)

declare variableName;

c)

var variableName;

d)

let variableName;

3.

Which of the following is NOT a built-in data type in Dart?

a)

int

b)

float

c)

String

d)

bool

4.

How do you define a list in Dart?

a)

Array myList = [1, 2, 3];

b)

Set myList = {1, 2, 3};

c)

List<int> list = [1,2,3];

d)

None of these

5.

How do you define a function in Dart that returns an integer?

a)

void myFunction() { return 10; }

b)

int myFunction() { return 10; }

c)

function myFunction() { return 10; }

d)

return myFunction() { 10; }

6.

What is the purpose of the 'void' keyword in a function definition?

a)

To specify the function returns an integer

b)

To declare a variable

c)

To indicate the function does not return a value

d)

To create a loop

7.

Which of the following is the correct way to call a function named calculateSum that takes two integer parameters?

a)

calculateSum(5, 10);

b)

calculateSum = (5, 10);

c)

calculateSum(5 10);

d)

calculateSum[5, 10];

8.

What is the correct syntax for an if statement in Dart?

a)

if condition {

// code

}

b)

if (condition) {
// code

}

c)

if: condition { // code }

d)

None of these

9.

What is the output of the following code?

a)

Greater than 5

b)

Less than or equal to 5

c)

Error

d)

None of the above

10.

Which of the following is a valid for loop syntax in Dart?

a)

for i in 1..10 { // code }

b)

for (var i = 0; i < 10; i++) { // code }

c)

foreach (var i in 10) { // code }

d)

loop (var i = 0 to 10) { // code }

11.

What is Flutter?

a)

A programming language

b)

A cross-platform UI toolkit

c)

A database management system

d)

An operating system

12.

Which language is primarily used to write Flutter applications?

a)

Java

b)

Swift

c)

Dart

d)

JavaScript

13.

What is the Flutter SDK?

a)

A software development kit for building Android apps only

b)

A software development kit for building iOS apps only

c)

A software development kit for building natively compiled applications for mobile, web, and desktop from a single codebase

d)

A software development kit for building backend services

14.

How do you install the Flutter SDK on Windows?

a)

Using a package manager like Homebrew

b)

Downloading the installation package from the official Flutter website and extracting it to a desired location and set environmental variable

c)

Installing it from the Microsoft Store

d)

Using the apt-get command

15.

What is the output of the following code?

a)

0 1 2

b)

1 2 3

c)

0 1 2 3

d)

1 2