In this program, you will learn how to create a simple program using class and object in Python.
self.x = x + 10
class Test:
def change(self, x):
self.x = x + 10
def display(self):
print("After value change:", self.x)
x = int(input("Enter a number:"))
obj = Test()
obj.change(x)
obj.display()
Enter a number:10
After value change: 20