How to explain this code???
if(choice=="1"):#Sign up: register to the system
      newAccount=Account()
      newAccount.signUp()
      accounts.append(newAccount)
      saveAccounts(accounts,FILE_NAME)
    elif(choice=="2"):#Sign in
      username =input("Enter the username of the account: ")
      password =input("Enter the password of account: ")
      Â
      accountExist=False
      for acc in accounts:
if(choice=="1"):#Sign up: register to the system
#instatiate new class object called newAccount
newAccount=Account()
# newAccount allows for sign up by calling function namely SignUp
newAccount.signUp()
#append the signup values to accounts db
accounts.append(newAccount)
#saves the account values in the file by calling function namely saveAccounts()
saveAccounts(accounts,FILE_NAME)
elif(choice=="2"):#Sign in
#ask users to input username
username =input("Enter the username of the account: ")
#ask users to input usernam
password =input("Enter the password of account: ")
#deactivate accountExit to execute loop
accountExist=False
#check every value in accounts
for acc in accounts:
Comments
Leave a comment