Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Python

Total questions: 28

Worksheet time: 9mins

Name
Class
Date
1.

What is a variable?

a)

Naming of the memory location

b)

it is an operator

c)

It is a data type

d)

None

2.

What is a dataype?

a)

Naming of the memory location

b)

it is an operator

c)

specifies which type of value a variable has

d)

None

3.

What is a operator?

a)

It is a container

b)

None

c)

specifies which type of value a variable has

d)

are special symbols

4.

Symbol for Addition Operator

a)

+

b)

-

c)

*

d)

/

5.

Symbol for Subtraction Operator

a)

+

b)

-

c)

*

d)

/

6.

Symbol for multiplication Operator

a)

+

b)

-

c)

*

d)

/

7.

Symbol for division Operator

a)

+

b)

-

c)

*

d)

/

8.

Symbol for integer division/floor division/truncate division Operator

a)

+

b)

-

c)

//

d)

/

9.

A comment in Python starts with the hash character _____

a)

+

b)

#

c)

//

d)

/

10.

Symbol for Assignment Operator

a)

+

b)

#

c)

=

d)

/

11.

Symbol for comparison Operator

a)

+

b)

==

c)

=

d)

/

12.

Symbol for finding the remainder

a)

+

b)

%

c)

=

d)

/

13.

Symbol for Not equal to

a)

+

b)

%

c)

=

d)

!=

14.

__________ are typos, incorrect indentation, or incorrect arguments.

a)

Syntax errors

b)

dataype

c)

operator

d)

Variable

15.

A python ________ is a reserved word which you can’t use as a name of your variable, class, function etc.

a)

Keyword

b)

dataype

c)

operator

d)

Variable

16.

Python is developed by________________

a)

Guido van Rossum

b)

Giudo van Rossum

c)

Guido ven Rossum

d)

Guido van Rassum

17.

Python is named after the comedy television show _______

a)

Monty Python’s Flying Circus

b)

Monty Python’s Flying Cricus

c)

Monyt Python’s Flying Circus

d)

Mnoty Python’s Flying Circus

18.

Python is platform independent or not?

a)

Yes

b)

No

c)

I don't know

d)

None

19.

IDE stands for ______________________

a)

integral development environment.

b)

integer development environment.

c)

None

d)

integrated development environment.

20.

_____ contains a code editor, a compiler or interpreter and a debugger that you can access at the same place.

a)

IDE

b)

IED

c)

DEI

d)

All

21.

Example for IDE is ____________

a)

Notepad

b)

Pycharm

c)

WordPad

d)

All

22.

A _________ is text that doesn’t affect the outcome of a code, it is just a piece of text to let someone know what you have done in a program or what is being done in a block of code. This is especially helpful when someone else has written a code and you are analyzing it for bug fixing or making a change in logic,

a)

Comment

b)

Variable

c)

datatype

d)

None

23.

The name of the variable must always start with either a letter or an underscore (_). For example: _str, str, num, _num are all valid name for the variables.

a)

True

b)

False

c)

I don't know

d)

None

24.

The name of the variable cannot start with a number. For example: 9num is not a valid variable name.

a)

True

b)

False

c)

I don't know

d)

None

25.

The name of the variable cannot have special characters such as %, $, # etc, they can only have alphanumeric characters and underscore (A to Z, a to z, 0-9 or _ ).

a)

True

b)

False

c)

I don't know

d)

None

26.

Variable name is case sensitive in Python which means num and NUM are two different variables in python.

a)

True

b)

False

c)

I don't know

d)

None

27.

x = 10

y = 20

print(x + y)


p = "Hello"

q = "World"

print(p + " " + q)

a)

30

Hello World

b)

10

Hello World

c)

I don't know

d)

None

28.

What will do ** operator?

a)

exponentiation

b)

multiplication

c)

addition

d)

None