0 ratings0% found this document useful (0 votes) 107 views5 pagesPython Interview Questions Part 1 Handwritten Notes
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
= —Rython Ttenteu =
leet estions ant t
the BOgTAmMming gis
(Most Tmpostont
Qt
io
vega
| What typeof language is_python 2 Programm.
xipling?
= Python _is_capable_of scripting but_in_geneval.
Purpose preg samening language
—S8-2_ How is _python_an interpreted lang age?
i Og xammi
——> | Ani
fo Beal ss 7 :
———_| before runtime. Thexfare , Python is an inter—
preted language
93
=>
What is pep 82
| A_name PEP stands for Python Enhancement _
___ Proposal. Tt_is_aset_of wles that specify how.
Q&
=>
| Hows is memory managed in Pyth
__ => Memory management _in_python_is man:
a et
po
wate heap
mae ce { this insted
on?
Pathog pvale heap space -AlLpython object
|_anddata_stuctures ave located in private heop
Re _progra mmex_dlees not have access +o this
i The_python_i olerpreter takes
|_caxe ©
lo Tre allecatio n_of heap spa c e for python
pret
==
; ch et ct cae ee
Api_qives access to some tools _
| The cove — goe | for the r ramme “toy cathe
l@ythan” alta has _an_—inh ilt garbage Collecto
—ahi ll the Unused memo ma-
wne_So for that if can be made available
othe heap space
Fy e q
re U
o his cod be funchions cl a
| Variables A python madule a
ontaining Cxecutable Co:
ome _o e_common|y ed _b 2
ules axe _e OS
@SYs
| a hatter time _@the-piog xe mming i]
© json :
Q7 | What axe local_and_globul_yasiable_in
ython.?
—___Ghobal_Vasiables*—
___|_Nostobles declared auiside o function avin
|__globsl space axe lec global__Variable.g »
| “These Vasiables can be accessed by on| function “in the_program, _@the-presnomming. girl
Local Variables:= ;
> Any variable eclaxed inside a function ig
_lenouon QS a local variable. This variable is
;>————Present in the local and n ot in_+he global |
Len ae
Oe
|}—_—> N18 a case sensitive language
99) What j Aype conyersion in Puthon ?
— Type conversion velexs 1o the “canes jon of
—one data type into cnsther-
__ Fox ex: ini CD, floater, set C) liste)
|
Qo | Ts indentation ssequired “in python?
|. sEndendation_is_necess on: Tt
cifies a block of code. All Code within |
| talaon sees: Seer ae a Nan inden.
| tec) blocks . \ One _Using
four Space_character. qouxcode is not
____| indented necessar ily Te uo ill_not execute
accurately and wil \_thaows err 1S as well
Sir ibat cae Gunehions_in_python?
= A fanclion sa block of code which is exec_
— Tated_onty When_il_is_called. Te dey
| Function j the def keyword is used
nN cat ee
erencedef init (Self, name):
Sel. name =name
—EL= Emploxy2")
Print CE4.name )_ 2. pr oqrumming . girl
is lambda 2
A u 1 ambde
Funckion » This function can have. ony number
of parameters _but have just one statement
e le .-
cy =lambda xy ¢ xty
print Cas .639
What_is self _in python ?
Self iS an instance oy an object of acla
| In python ,4 his 1s explicity included ag
| the tust_pasarmeter, This is nol the case
in java cohexe i's oF dionol T+ helps +o
[ “aiffesenhole_belssetn the methods and_
| attributes of a class coith local varihbles
~“he_self_vasiable in the init method1
pact ne |
_|ovhile in other methods, 4 refers to the
object whose method was called
18) What ase _pylhon iterators?
=.
Tiervators aye objects which can _be
—___|_ traversed though or ilesated apon,
Fottes to p ‘loxe
Most important interview question
fox Companies Ke Tes, witto
Accenture, Mindtree, CL, Persclend
aa are sie Progra mrting. a
Cove fos Ties use W
—— Gtoy tuned fox next port