Knowing That A Function Named F
Knowing That A Function Named F
module
a list of all the entities residing in the math module
module
3. The compiled Python bytecode is
stored in files having names ending
with:
py
pyb
pc
pyc
4. Assuming that all three files, a.py,
b.py, and c.py reside in the same
folder, what will be the output
produced by running the c.py file?
# file a.py
print(“a”,end=”)
#file b.py
import a
print(“b”,end=”)
#file c.py
print(“c”,end=”)
import a
import b
cba
abc
bac
cab
5. What will be the output of the
following code, located in file p.py?
print(__name__)
p.py
main
__p.py__
__main__
b
a
c
b
is erroneous
has no effect
1
3
t
q
r
prints 13
prints 1,3
1.3
object = Class(1)
object = Class()
object = Class(1,2)
cause an exception