Coder Baba
2.41K subscribers
1.01K photos
23 videos
722 files
726 links
Everything about programming for beginners.
1 and only official telegram channel of CODERBABA India.

Content:
.NET Developer,
Programming (ASP. NET, VB. NET, C#, SQL Server),
& Projects
follow me https://linktr.ee/coderbaba
*Programming
*Coding
*Note
Download Telegram
What is DotNet Framework?
What is Data in Database?
Python Interview Question Answer:

Q1- What type of language is python? Programming or scripting?
ANS- Python is capable of scripting, but in general purpose programming language.

Q2-How is python an interpreted language?
ANS- An Interpreted Language is any programming language which is not in machine level code before runtime . Therefore, Python is an Interpreted language.


Q3-What is pep8?
ANS-A name PEP stands for Python Enhancement propose. It is a set of rules that specify how to format python code for maximum readability.

Q4--How is memory managed in Python?
ANS-Memory management in python is managed by python private heap space. All python objects and data structures are located in Private heap. The Programmer does not have access to this private heap. The python interpreter takes care of this instead.

The Allocation of heap space for python objects is done by pythons memory manager. the core API gives access to some tools for the programmer to code.

Python also has an inbuilt garbage collector which recycles all the unused memory management and so for that it can be made available to the heap space.

Q5-What is Namespace in Python?
ANS-A Namespace is naming system used to make sure that names are unique to avoid naming conflicts.


Q6-What are python modules? name some commonly used built in modules in python?
ANS- Python modules are files containing python code. this code can be functions classes or variables. a python module is a.py file containing executable code.
some of the commonly used built in modules are as
* OS
*Sys
*datatime
*json

Q7-What are local and global variable in python?
ANS-
Global Variables: Variables declared outside a function or in global space are called global variables. these variables can be accessed by any function in the program.

Local Variables:
Any variable declared inside a function is known as local variable. This variables is present in the local and not in the global space.

Q8-Is python case sensitive?
Ans- yes, Python is a case sensitive language

Q9-What is type conversion in python?
ANS- Type conversion refers to the conversion of one data type into another.
for ex. int(), float(), set() , list()

Q10- Is Indentation required in python?
ANS- Indentation is necessary for python . It specifies a block of code. all code within loops classes function etc. within an indented blocks. It is usually done using four space character. If your code is not indented necessarily. it will not execute accurately and will throw errors as well.



Q11- What are functions in python?
ANS_ A function is a block of code which is executed only when it is called . to define a python function, the def keyword is used .
def Newfunc();
Print("coderbaba")



Q12-What is _init_
ANS- _init_ is a method or constructor in python this method is automatically called to allocate memory when a new object of a class is created. all classes have the _init_ method .
for ex-

Class Emp:
def_init_(self,name):
Self.name=name
E1=Emp('coderbaba')
print(E1.name)

Q13- What is lambda function?
ANS- An anonymous function is known as a lambda function. this function can have any number of parameters but have just one statement .
example-
a=lambda x,y:x+y
print(a(5,6))


Q14- what is self in python?
ANS- self is an instance or an object of a class. In python, this is explicity included as the first parameter. this is not the case in java where it's optional it helps to differentiate between the methods and attributes of a class with local variables . the self variable in the init method refers to the newly created object.

for more update follow
www.instagram.com/coderbaba
Hi Guys New video out today
watch here👉 https://youtu.be/APefcZ_L6sM
Interview question OOp.docx
1.2 MB
Object Oriented Programming Interview Questions with Answers
HTML Interview Questions and Answers by CODERBABA.pdf
665.1 KB
HTML Interview Questions and Answers
👆👌🎯