Question: ( b ) Observe the following Python code carefully and obtain the output, which will appear on the screen after execution of it . i
b Observe the following Python code carefully and obtain the output, which will appear on the screen after execution of it
print
print
c Give the difference between the type casting and automatic type conversion. Also, give a suitable Python code to illustrate both.
d What do you understand by local and global scope of variables? How can you access a global variable inside the function, if function has a variable with same name?
e What will be the output of the following Python code?
i class :
def init self:
self.
def countself:
self. self
class :
def self:
Aself
self.
def countself:
self.
def main:
obj Bo
obj count
printobjx obj.y
maino
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
