PYTHON INTERVIEW QUESTIONS




Question.1:- What is Python?

Answer:- Python is a high-level, interpreted, general-purpose programming language. Being a general-purpose language it can be used to build almost any type of application with the right tools.

Question.2:- What are the Benefits of using Python?

Answer:- Python is a general-purpose programming language that has a simple, easy-to-learn, syntax that emphasizes readability and therefore reduces the cost of program maintenance. The language is capable of scripting, is completely open-source, and supports third-party packages encouraging modularity and code reuse.

Question.3:- What is Dynamically typed language?

Answer:- Static: Data types are checked before execution

Dynamic: Data types are checked during execution. Python is an interpreted language, that executes each statement line by line and thus type-checking is done on the fly, during execution. Hence, python is a dynamically typed language.

Question.4:- What is an Interpreted language?

Answer:- An interpreted language executes its statements line by line. languages such as PYTHON, JAVASCRIPT, PHP, and RUBY are prime examples of interpreted languages.

Question.5:- What is PEP 8 and why is it important?

Answer:- PEP stands for python enhancement proposal. A PEP is an official design document providing info python to the python community, or describing a new feature by esespecially8 is especially important since it document guidelines style for python code.

Question.6:- What is Scope in python?

Answer:- Every object in python functions within a scope. A scope is a block of code where an object in python remains relevant. A scope defines for them where you could use their objects without any prefix.

Question.7:- What are Lists and Types? What is the key difference between the two?

Answer:- Lists and types are both sequence data types that can store a collection of objects in python. Lists are represented with square brackets [.....].while types are other hand parenthesized with parentheses difference key to the differences between the two is that while lists are mutable, types on the other side are immutable objects.