Oct-23-2019, 10:46 PM
To whom it may concern,
Good afternoon, I have recently started a side project of mine to see how far I could stretch my knolage in python and I hit a prety large wall. I am trying to make a kind of user system to be able to save a users name + pin and be able to recall it, It saves a them inside of a new fine, but as soon as I run the program again it overwrites it. I do not even know how to get startted on recalling user inputs from a separate file.
My spaghetti:
Respectfully,
ThatOneGuyNoOneKnows
Good afternoon, I have recently started a side project of mine to see how far I could stretch my knolage in python and I hit a prety large wall. I am trying to make a kind of user system to be able to save a users name + pin and be able to recall it, It saves a them inside of a new fine, but as soon as I run the program again it overwrites it. I do not even know how to get startted on recalling user inputs from a separate file.
My spaghetti:
print("WELCOME TO JESUS BANKING")
def make_an_acc():
print("Our bank is the strongest around!\n")
print("Enter your name\n")
newname = input("\n")
print("Enter the most secure 4 digit code that you can think of \n")
newpin = input("\n")
name = open("Bank files/Account Info/Accounts","w");
name.write(newname + " " + newpin)
name.close()
print("Enter the amount you want to deposit\n")
newamount = int(input("\n"))
return [newname, newpin, newamount]
def datastore(make_an_acc):
name = open("Bank files/Account Info/Accounts","w");
name.write(make_an_acc())
name.close()
customer_details = make_an_acc()Thank you for any help in advance.Respectfully,
ThatOneGuyNoOneKnows
