wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

COMP2_Quiz1

Total questions: 23

Worksheet time: 16mins

Name
Class
Date
1.

It is a general-purpose interpreted, interactive, object-oriented, and high-level programming language.

(a)  

2.

Who created Python Programming Language?

(a)  

3.

It is used by Python to indicate a code block

a)

Indetation

b)

New Line

c)

Semi colon

d)

Curly braces

e)

Square bracket

4.

It is used by Python to end a command/statement

a)

Indetation

b)

New Line

c)

Semi colon

d)

Curly braces

e)

Square bracket

5.

These are containers for storing data values.

a)

Variables

b)

Data Types

c)

Comment

d)

Input() Function

6.

These are the classification of data assigned to a variable.

a)

Variables

b)

Data Types

c)

Comment

d)

Input() Function

7.

It is the term for converting one data type into another data type.

a)

Casting

b)

Concatenate

c)

Comment

d)

Input() Function

8.

It is the term for joining two strings together

a)

Casting

b)

Concatenate

c)

Comment

d)

Input() Function

9.

This code is used to accept input from the user

a)

Casting

b)

Concatenate

c)

Comment

d)

Input() Function

10.

It is added with the purpose of making the source code easier for humans to understand, and are generally ignored by compilers and interpreters.

a)

Casting

b)

Concatenate

c)

Comment

d)

Input() Function

11.

It is the sign used for single line comment in Python

a)

# (Hash Sign)

b)

// (Double Slash)

c)

/* */ (Slash asterisk at the beginning and asterisk slash at the end)

d)

''' ''' (Triple single quote at the beginning and triple single quote at the end)

12.

It is the sign used for multiple line comment in Python

a)

# (Hash Sign)

b)

// (Double Slash)

c)

/* */ (Slash asterisk at the beginning and asterisk slash at the end)

d)

''' ''' (Triple single quote at the beginning and triple single quote at the end)

13.

In Python, a variable is created the moment you first assign a value to it

a)

TRUE

b)

FALSE

14.

In Python, you must declared first the data type followed by the variable and lastly will be the value assigned to a variable

a)

TRUE

b)

FALSE

15.

Python is like C++ in naming variable they both case sensitive and follows the common programming convention of variable naming

a)

TRUE

b)

FALSE

16.

Python is a dynamically-typed language

a)

TRUE

b)

FALSE

17.

In Python we can concatenate number with string without declaring the number as string

a)

TRUE

b)

FALSE

18.

Python accepts single ('), double (") and triple (''' or """) quotes to denote string literals, as long as the same type of quote starts and ends the string

a)

TRUE

b)

FALSE

19.

The triple quotes are used to span the string across multiple lines.

a)

TRUE

b)

FALSE

20.

All characters after the # and up to the end of the physical line are part of the comment and the Python interpreter ignores them

a)

TRUE

b)

FALSE

21.

A line containing only whitespace, possibly with a comment, is known as a blank line and Python totally ignores it.

a)

TRUE

b)

FALSE

22.

Enumerate at least 5 data types in Python (Separate your answers by comma, do not hit enter unless you're done with this item)

4 lines
23.

Enumerate the 4 characteristics of Python (Separate your answers by comma, do not hit enter unless you're done with this item)

4 lines