Python Interview Questions and Answers for Placement and Job

1.

Is Python a scripting Language?

A: Yes, but it is not just a scripting Language, It is also an Object Oriented Language and supports Classes/ Inheritance too.

Python is a remarkably powerful dynamic programming language that is used in a wide variety of application domains. It is a full fledged programming language which can be used to develop a range of softwares from websites to desktop apps to mobile apps to graphic tools etc

2.

Give an example of Compile Time Error in Python

A: Python is an interpreted language and we can not compile it. Hence Python does not have Compile Time Errors.


Each line of your python program is executed and if there is any error in the program, it throws an exception and the program exits if the exception is not handled properly.

3.

What are .pyc files in python?

A: .pyc files contains bytecodes of the program.
When we execute our python program, Python first compiles our code in to bytecodes and stores it inside the same folder with an extension of .pyc.

Python does bytecode compilation to make the execution of our program faster.
The next time we run our program, Python checks for the timestamp of the source file and the .pyc file and decides if it has to re-compile the source code or not. If the source codehas not changed, the .pyc file is executed which is much faster.


<Incoming Search Terms>

  1. Python Interview Questions and Answers 
  2. Python Objective Interview questions and Answers
  3. Answer to Python Interview Questions
  4. Python Job Interview Questions


Comments

Popular posts from this blog

Cryptarithmetic Problems with solution for eLitmus pH Test CAT Cryptarithmetic

CyberLink YouCam Dark Image Solution

How to Access torrent sites in India