Loading...

Python Self Test Skills

1. Who developed Python Programming Language ?

A. Wick van Rossum

B. Rasmus Lerdorf

C. Guido Van Rossum

D. Niene Stom

Answers : C is Correct

2. Which type of Programming does Python support?

A. Object Oriented Programming

B. Structured Programming

C. Functional Programming

D. All of the Above

Answers : D is Correct

3. Is Python Case Sensitive when dealing with identifiers ?

A. No

B. Yes

C. Machine Dependent

D. None of the Above

Answers : B is Correct

4. Which of the following is the correct extension of the Python file ?

A. dot python (.python)

B. dot py (.py)

C. dot pl (.pl)

D. dot pthon (.pthon)

Answers : B is Correct

5. Is Python code compiled or interpreted ?

A. Python code is both compiled and interpreted

B. Python code is neither compiled not interpreted

C. Python ode is only compiled

D. Python code is only interpreted

Answers : A is Correct

6. All keywords in Python are in ____________?

A. Capitalized

B. Lower Case

C. Upper Case

D. None of the Above

Answers : D is Correct

7. What will be the value of the following Python Expression print(4 + 3 % 5) ?

A. 7

B. 2

C. 4

D. 1

Answers : A is Correct

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

A. Indentation

B. Key

C. Brackets

D. All of the Above

Answers : A is Correct

9. Which keyword is used for function in Python language ?

A. Function

B. def

C. Fun

D. Define

Answers : B is Correct

10. Which of the following character is used to give single-line comments in Python ?

A. //

B. #

C. !

D. /*

Answers : B is Correct

11. Which of the following functions can help us to find the version of python that we are currently working on ?

A. sys.version(1)

B. sys.version(0)

C. sys.version()

D. sys.version

Answers : D is Correct

12. Python supports the creation of anonymous functions at runtime, using a construct called __________ ?

A. pi

B. anonymous

C. lambda

D. None

Answers : C is Correct

13. What will be the output of the following Python code snippet if x = 1 then x << 2 ?

A. 4

B. 2

C. 1

D. 8

Answers : A is Correct

14. What does pip stand for python ?

A. Pip Installs Python

B. Pip Installs Packages

C. Preferred Installer Program

D. All of the Above

Answers : C is Correct

15. Which of the following functions is a built-in function in python ?

A. factorial()

B. print()

C. seed()

D. sqrt()

Answers : B is Correct

16. Which of the following is not a core data type in Python programming ?

A. Tuples

B. Lists

C. Class

D. Dictionary

Answers : C is Correct

17. What will be the output of the following Python expression if x = 56.236 then print('%.2f'%x) ?

A. 56.236

B. 56.23

C. 56.0000

D. 56.24

Answers : D is Correct

18. What will be the output of the following Python statement print('a' + 'bc') ?

A. bc

B. abc

C. a

D. bca

Answers : B is Correct

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

A. pass

B. eval

C. assert

D. nonlocal

Answers : B is Correct

20. Which module in the python standard library parses options received from the command line ?

A. getarg

B. getopt

C. main

D. os

Answers : B is Correct

21. What arithmetic operators cannot be used with strings in Python ?

A. *

B. -

C. +

D. None

Answers : B is Correct