wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Quiz Python 1

Total questions: 10

Worksheet time: 3mins

Name
Class
Date
1.

Which one of the following is correct way of declaring and initialising a variable, x with value 5?

a)

def x=5

b)

x=5

c)

int x=5

d)

int x x=5

2.

Which of the following is not valid variable name in Python?

a)

var11

b)

11var

c)

var_name

d)

_var

3.

Is Python identifiers(variable name)case sensitive ?

a)

True

b)

False

4.

Which of the following will give error?

a)

a,b,c=1, 2 , 1.5

b)

a=b=c=1

c)

a,b,c=1

d)

None of the above

5.

Which of the following is a valid variable?

a)

var@

b)

32var

c)

abc_a_c

d)

class

6.

Python only works in Linux and Windows.

a)

True

b)

False

7.

Python does not have exception handling.

a)

True

b)

False

8.

Python is free and open source

a)

True

b)

False

9.

Why python is popular?

a)

Because it is easy to learn and has clear syntax.

b)

Because it is hard to learn and has complex syntax

c)

Because it is derived from Java

d)

Because it is used by Apple

10.

n Python, a variable may be assigned a value of one type, and then later assigned a value of a different type

a)

True

b)

False