wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Examination (Midterm) in Open-Source Programming Language

Total questions: 48

Worksheet time: 25mins

Name
Class
Date
1.

Popular programming language. It was created by Guido van Rossum, and released in 1991.

a)

Java

b)

C++

c)

Python

d)

C#

2.

Python can be used on a server to create web applications.

a)

TRUE

b)

FALSE

3.

Python can be used alongside software to create workflows.

a)

True

b)

False

4.

Python can connect to database systems. It can also read and modify files.

a)

TRUE

b)

FALSE

5.

Python can be used only to handle small data and perform simple mathematics.

a)

TRUE

b)

FALSE

6.

Python can be used for rapid prototyping, or for production-ready software development.

a)

TRUE

b)

FALSE

7.

Refers to the spaces at the beginning of a code line.

a)

Indention

b)

semi-colon

c)

colon

d)

hash

8.

Python use what when commenting something.

a)

//

b)

#

c)

/**/

d)

\*

9.

Created the moment you first assign a value to it.

a)

Constant

b)

Variable

c)

Dynamic

d)

Multiround

10.

All are numeric types except one.

a)

int

b)

float

c)

string

d)

complex

11.

Constructs an integer number from an integer literal, a float literal (by removing all decimals), or a string literal (providing the string represents a whole number)

a)

int()

b)

float()

c)

str()

d)

complex()

12.

Constructs a float number from an integer literal, a float literal or a string literal (providing the string represents a float or an integer)

a)

int()

b)

float()

c)

str()

d)

complex()

13.

Constructs a string from a wide variety of data types, including strings, integer literals and float literals

a)

int()

b)

float()

c)

str()

d)

complex()

14.

Booleans represent one of two values: Choose 2

a)

TRUE

b)

FALSE

c)

MAYBE

d)

ALL

15.

A collection which is ordered and changeable. Allows duplicate members.

a)

List

b)

Tuple

c)

Sets

d)

Dictionary

16.

A collection which is ordered and unchangeable. Allows duplicate members.

a)

List

b)

Tuple

c)

Sets

d)

Dictionary

17.

A collection which is unordered, unchangeable*, and unindexed. No duplicate members.

a)

List

b)

Tuple

c)

Sets

d)

Dictionary

18.

A collection which is ordered** and changeable. No duplicate members.

a)

List

b)

Tuple

c)

Sets

d)

Dictionary

19.

Python has two primitive loop commands what are they? Choose 2

a)

While

b)

For

c)

if

d)

elif

20.

Requires relevant variables to be ready, in this example we need to define an indexing variable, i, which we set to 1.

a)

While

b)

For

c)

if

d)

elif

21.

Used for iterating over a sequence (that is either a list, a tuple, a dictionary, a set, or a string).

a)

While

b)

For

c)

if

d)

elif

22.

A block of code which only runs when it is called.

a)

Function

b)

Structure

c)

Foundation

d)

Calling

23.

In Python, surrounded by either single quotation marks, or double quotation marks.

a)

Char

b)

String

c)

Byte

d)

Bit

24.

Requires relevant variables to be ready, in this example we need to define an indexing variable, i, which we set to 1.

a)

While

b)

For

c)

if

d)

elif

25.

Used for iterating over a sequence (that is either a list, a tuple, a dictionary, a set, or a string).

a)

While

b)

For

c)

if

d)

elif

26.

A block of code which only runs when it is called.

a)

Function

b)

Structure

c)

Foundation

d)

Calling

27.

In Python, surrounded by either single quotation marks, or double quotation marks.

a)

Char

b)

String

c)

Byte

d)

Bit

28.

Python can be used only to handle big data and perform complex mathematics.

a)

TRUE

b)

FALSE

29.

Python can be used for rapid prototyping, or for production-ready software development.

a)

TRUE

b)

FALSE

30.

Refers to the spaces at the beginning of a code line.

a)

Indention

b)

semi-colon

c)

colon

d)

hash

31.

Python use what when commenting something.

a)

//

b)

#

c)

/**/

d)

\*

32.

Created the moment you first assign a value to it.

a)

Constant

b)

Variable

c)

Dynamic

d)

Multiround

33.

All are numeric types except one.

a)

int

b)

float

c)

string

d)

complex

34.

Constructs an integer number from an integer literal, a float literal (by removing all decimals), or a string literal (providing the string represents a whole number)

a)

int()

b)

float()

c)

str()

d)

complex()

35.

Constructs a float number from an integer literal, a float literal or a string literal (providing the string represents a float or an integer)

a)

int()

b)

float()

c)

str()

d)

complex()

36.

Constructs a string from a wide variety of data types, including strings, integer literals and float literals

a)

int()

b)

float()

c)

str()

d)

complex()

37.

Python can be used on a server to create web applications.

a)

TRUE

b)

FALSE

38.

Python can be used alongside software to create workflows.

a)

TRUE

b)

FALSE

39.

Python can connect to database systems. It can also read and modify files.

a)

TRUE

b)

FALSE

40.

Python can be used to handle big data and perform complex mathematics.

a)

TRUE

b)

FALSE

41.

Python can be used for slow prototyping, or for production-ready software development.

a)

TRUE

b)

FALSE

42.

Python works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc).

a)

TRUE

b)

FALSE

43.

Python has a complex syntax similar to the French language.

a)

TRUE

b)

FALSE

44.

Python has syntax that allows developers to write programs with fewer lines than some other programming languages.

a)

TRUE

b)

FALSE

45.

Python runs on an interpreter system, meaning that code can be executed as soon as it is written. This means that prototyping can be very quick.

a)

TRUE

b)

FALSE

46.

Python can be treated in a procedural way, an object-oriented way or a functional way.

a)

TRUE

b)

FALSE

47.

Requires relevant variables to be ready, in this example we need to define an indexing variable, i, which we set to 1.

a)

While

b)

For

c)

if

d)

elif

48.

Used for iterating over a sequence (that is either a list, a tuple, a dictionary, a set, or a string).

a)

While

b)

For

c)

if

d)

elif