wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

python daily 10 questions 30 seconds

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

In which year was the Python language developed?

a)

1995

b)

1972

c)

1981

d)

1989

2.

Which one of the following is the correct extension of the Python file?

a)

.py

b)

.python

c)

.p

d)

None of these

3.

Which character is used in Python to make a single line comment?

a)

/

b)

//

c)

#

d)

!

4.

What is the method inside the class in python language?

a)

Object

b)

Function

c)

Attribute

d)

Argument

5.

Why does the name of local variables start with an underscore discouraged?

a)

To identify the variable

b)

It confuses the interpreter

c)

It indicates a private variable of a class

d)

None of these

6.

Which of the following is not a keyword in Python language?

a)

val

b)

raise

c)

try

d)

with

7.

Which of the following statements is correct for variable names in Python language?

a)

All variable names must begin with an underscore.

b)

Unlimited length

c)

The variable name length is a maximum of 2.

d)

All of the above

8.

Which of the following declarations is incorrect in python language?

a)

xyzp = 5,000,000

b)

x y z p = 5000 6000 7000 8000

c)

x,y,z,p = 5000, 6000, 7000, 8000

d)

x_y_z_p = 5,000,000

9.

Which of the following precedence order is correct in Python?

a)

Parentheses, Exponential, Multiplication, Division, Addition, Subtraction

b)

Multiplication, Division, Addition, Subtraction, Parentheses, Exponential

c)

Division, Multiplication, Addition, Subtraction, Parentheses, Exponential

d)

Exponential, Parentheses, Multiplication, Division, Addition, Subtraction

10.

Which one of the following has the highest precedence in the expression?

a)

Division

b)

Subtraction

c)

Power

d)

Parentheses