In: Computer Science
Python
1.Explain what happens when a program receives a non-numeric string when a number is expected as input, and explain how the try-except statement can be of use in this situation.
2.What is meant by the state of an object, and how does the programmer access and manipulate it?
3.Explain the differences between instance variables and temporary variables. Focus on their visibility in a class definition, and on their roles in managing data for an object of that class.
4.Explain the purpose of the variable self in a Python class definition.
Ans1:
Ans2:
Ans 3:
Instance Variables:-
Temporary variables:-
Ans4: