I’m following a tutorial and am learning about creating a class in Python. I’ve double-checked my code against the tutorial and I don’t see any errors, but I’m getting
TypeError: User() takes no arguments. If you can point out what I’m doing wrong, I would be most grateful. This was how the person demonstrating passed parameters to create a new object from class User, but it’s not working the same way for me. Thank you!
class User:
def __int__(self, user_email, name, password, current_job_title):
self.email = user_email
self.name = name
self.password = password
self.current_job_title = current_job_title
def change_password(self, new_password):
self.password = new_password
def change_job_title(self, new_job_title):
self.current_job_title = new_job_title
def get_user_info(self):
print(f"User {self.name} currently works as a {self.current_job_title}. You can contact them at {self.email}.")
app_user_one = User("email@email.com", "John Smith", "passw0rd", "Engineer")
app_user_one.get_user_info()