The sample code is below. I am trying to get the inputted value for the 'name' variable from the first method and use it to print a message using the second method (method2). I would appreciate any advice on how to do this or alternative ways to go about it.
class User:
method1(self):
name = input("Enter name")
method2(self):
greeting = print("Hello", name)