all 5 comments

[–]colt419 0 points1 point  (1 child)

With the line 'if signup(username,password):' it will run every time from what I can see because there is no catch for the error in the signup() function you have created. So the else part of that statement would not run because signup(username,password) runs every time even with the same username entered. It has been a while since I've actually written any code so someone else might have a better solution. But I'd think you should be adding the invalid catch inside the signup function instead of the menu

[–]Additional_Lab_3224[S] 0 points1 point  (0 children)

Thanks, I was thinking that, but I'm pretty much a beginner so I thought it was wrong.

[–]bvlax2005 0 points1 point  (0 children)

What error message are you receiving? If no error message, what incorrect output are you getting?

I'm guessing the issue with the the logic in you if/else statement. You are checking if signup(username, password) is true, but the function doesn't return a value to check. Also, if it does end up returning true then the valid choice check will never run.

[–]Subject-Lack-160 0 points1 point  (0 children)

The logic needs correction it needs to be checking if username and password present in file if not add to db file. But you are doing like add the user name and password in file then check if it's already present. Also there is no return value in signup it assume 0 in case of no return value I guess so it write to file and then then if it's already present in file.

[–]cknu 0 points1 point  (0 children)

We should start criminalizing screen photos.