wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Basic Python Questions

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

1. Who developed Python Programming Language?

a)

a) Wick van Rossum

b)

b) Rasmus Lerdorf

c)

c) Guido van Rossum

d)

d) Niene Stom

2.

2. Which type of Programming does Python support?

a)

a) object-oriented programming

b)

b) structured programming

c)

c) functional programming

d)

d) all of the mentioned

3.
  1. 3. Which of the following is the correct extension of the Python file?

a)

a) .python

b)

b) .pl

c)

c) .py

d)

d) .p

4.
  1. 4. Is Python case sensitive when dealing with identifiers?

a)

a) No

b)

b) Yes

c)

c) Machine dependent

d)

d) None

5.
  1. 5. What will be the value of the following Python expression?

    4 + 3 % 5
a)

a) 7

b)

b) 2

c)

c) 4

d)

d) 1

6.
  1. 6. What will be the value of the following Python expression?

    4 + 3 % 5
a)

a) 7

b)

b) 2

c)

c) 4

d)

d) 1

7.
  1. 7. Which of the following is used to define a block of code in Python language?

a)

a) Indentation

b)

b) Key

c)

c) Brackets

d)

d) All of the mentioned

8.

8. What are the values of the following Python expressions?

2**(3**2)
 (2**3)**2
 2**3**2
a)

a) 512, 64, 512

b)

b) 512, 512, 512

c)

c) 64, 512, 64

d)

d) 64, 64, 64

9.
  1. 9. Which of the following statements is correct regarding the object-oriented programming concept in Python?

a)

a) Classes are real-world entities while objects are not real

b)

b) Objects are real-world entities while classes are not real

c)

c) Both objects and classes are real-world entities

d)

d) None of the above

10.
  1. 10. What will be the output of the following Python function?

  2. min(max(False,-3,-4), 2,7)

a)

a) -2

b)

b) -3

c)

c) 2

d)

d) False