pythonansct
pythonansct
Ans:
A namespace in Python is a system that ensures unique names for variables, functions, and
objects by mapping them to their respective objects. Python has different types of
namespaces:
Matplotlib is a data visualization library used to create static, animated, and interactive plots.
It is mainly used for:
Example:
import matplotlib.pyplot as plt
x = [1, 2, 3, 4]
y = [10, 20, 25, 30]
plt.plot(x, y)
plt.xlabel('X-axis')
plt.ylabel('Y-axis')
plt.title('Simple Plot')
plt.show()
4. Write a python program to read contents of first.txt file and write same
content in second.txt file.
Ans:
OR
5. Explain multiple inheritance and write a python program to implement it
Ans:
6. Write a python program to create a user defined module that will ask your
program name and display the name of the program.
Ans:
7. Design a class Employee with data members :name,department and
salary.create methods for reading and printing employee information.
Ans:
o Not a Keyword: self is just a convention (you can use any name, but
self is recommended).
Output: