wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Prelim Exam - Comp Vision

Total questions: 25

Worksheet time: 13mins

Name
Class
Date
1.

Python is a _____ language, so you don't have to explicitly define the variable type.

a)

type-inferred

b)

dynamic

c)

flexible

d)

pre-defined

2.

Python is a _____ language, so you don't have to explicitly define the variable type.

a)

type-inferred

b)

dynamic

c)

flexible

d)

pre-defined

3.

A ____ is a type of variable whose value cannot be changed. It is helpful to think of constants as containers that hold information which cannot be changed later.

a)

constant

b)

fixed

c)

constant variable

d)

pre-defined

4.

___ is a raw data given in a variable or constant.

a)

Literal

b)

Variable

c)

Constant

d)

Numerical

8.

____ is an unordered collection of key-value pairs.

It is generally used when we have a huge amount of data

a)

dict

b)

set

c)

list

d)

tuple

9.

In ___ type conversion, Python automatically converts one data type to another data type.

a)

implicit

b)

explicit

c)

dynamic

d)

flexible

10.

In ____ Type Conversion, users convert the data type of an object to required data type. We use the predefined functions like int(), float(), str(), etc to perform type conversion.

a)

explicit

b)

implicit

c)

dynamic

d)

flexible

11.

In Python, the body of the ___ statement is indicated by the indentation.

a)

IF

b)

ELSE

c)

ELIF

d)

ELSE IF

12.

The ___ statement evaluates test expression and will execute the body of if only when the test condition is True

a)

IF ELSE

b)

ELSE IF

c)

ELIF

d)

ELSE

13.

The ___ is short for else if. It allows us to check for multiple expressions.

a)

ELIF

b)

ELSE IF

c)

ELSIF

d)

ELIFS

14.

The ___ loop in Python is used to iterate over a sequence (list, tuple, string) or other iterable objects

a)

FOR

b)

WHILE

c)

FOR ELSE

d)

WHILE ELSE

15.

Loop continues until we reach the last item in the ___. The body of for loop is separated from the rest of the code using indentation.

a)

SEQUENCE

b)

RANGE

c)

LIST

d)

LIST RANGE

16.

The ___ object is "lazy" in a sense because it doesn't generate every number that it "contains" when we create it.

a)

RANGE

b)

LIST

c)

SEQUENCE

d)

LIST RANGE

17.

The ___ part is executed if the items in the sequence used in for loop exhausts.

a)

ELSE

b)

FOR ELSE

c)

WHILE ELSE

d)

FOR IF ELSE

18.

The ___ loop in Python is used to iterate over a block of code as long as the test expression (condition) is true.

a)

WHILE

b)

FOR

c)

DO WHILE

d)

WHILE DO

19.

In Python, the body of the while loop is determined through ___.

a)

INDENTION

b)

SPACE

c)

TAB

d)

INDENT SPACE

20.

Same as with for loops, while loops can also have an optional ___ block.

a)

ELSE

b)

BREAK

c)

PASS

d)

END

21.

We use the ___ function to output data to the standard output device (screen)

a)

PRINT

b)

PRINTF

c)

COUT

d)

PRINTC

22.

The ___ separator is used between the values. It defaults into a space character.

a)

SEP

b)

END

c)

SPACE

d)

SET

23.

To allow flexibility, we might want to take the input from the user. using ___ command

a)

INPUT

b)

CIN

c)

INPUTF

d)

GET

24.

Definitions inside a module can be imported to another module or the interactive interpreter in Python.

a)

IMPORT

b)

GET

c)

DEF

d)

SET

25.

In Python programming, the ___ statement is a null statement.

a)

PASS

b)

CONTINUE

c)

BREAK

d)

NULL