I have no idea how to write python I am currently trying and have been stuck on this error for 3 hours, I have absolutely no idea what to do anymore
import os, sys
clear = lambda: os.system("clear")
from Account import *
account = Account()
name = Account()
password = Account()
while True:
print()
print('User Authentication:')
print('1. Login to Account')
print('2. Create Account')
print('3. Exit')
print()
action = input('Please Select Option: ')
action = action[0]
print()
if action == '1':
account.login(name, password)
elif action == '2':
account.create(name, password)
elif action == "3":
sys.exit()
For my main.py and for account.py here
import os
class Account():
def __init__(self):
self.name = []
self.password = []
self.clear = lambda: os.system("clear")
def login(self, name, password):
self.name = input("Please enter your username: ")
if password != self.password or name != self.name:
print("Incorrect Username or password")
if password == self.password and name == self.name:
print("Log in successful")
def create(self, name, password):
self.name = input("Please enter a username for your account: ")
self.name.append(name)
self.password = input("Please create a password for your account: ")
self.password.append(password)