what do i change in this so that it does not display the iteration. only the print statement in the end of the if branches state | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

what do i change in this so that it does not display the iteration. only the print statement in the end of the if branches state

right now if i input the username and password it goes into the database and retrieves the data related to those variables and then checks whether they are true. However i get the following results code is on my profile called "effing login" Username: hello Password: hello12 "run the code" login unsuccessful login unsuccessful login unsuccessful login Successful >>> thanks UPDATE - more info in code explaining stuff. https://code.sololearn.com/c74jBk5J691c/#py

26th Apr 2018, 9:07 PM
annie
annie - avatar
10 Answers
+ 3
Update: https://code.sololearn.com/cHR963sRAVMX/?ref=app A dictionary has keys and values, use the username as the key. A database (MySQL would be better than a CSV). Also it's not good storing passwords as plaintext, however I understand this is just a demo for you to learn with? As CSV doesn't work on here, I created a dummy login dictionary instead, to show it working. There are other issues also.
27th Apr 2018, 4:08 PM
Emma
+ 4
done it. it looks like an absolute beaut. i was thinking of hashing or adding some other encryption method (basic - like Caesar for fun) it but its gonna take too long for me to learn that and add it in by tom because i need to finish the rest of it. thanks a lot... (again).
27th Apr 2018, 6:04 PM
annie
annie - avatar
+ 3
Put your code in the Code Playground on here.
27th Apr 2018, 12:32 PM
Emma
+ 3
thank u very much. I'll implement that in my code. much appreciated😗
27th Apr 2018, 4:48 PM
annie
annie - avatar
+ 3
Yes, if it needs to be in tomorrow, then best to do lots of testing, rather than change anything too late and introduce errors ☺
27th Apr 2018, 6:31 PM
Emma
+ 3
yep got to write a 100 page assignment on it due Sunday and finish the coding by tom😂😣😥😭😨 (from the emojis, see how stressed I am)
27th Apr 2018, 8:16 PM
annie
annie - avatar
+ 2
Xan sure will. I thought no ond was gonna look at it
27th Apr 2018, 1:22 PM
annie
annie - avatar
+ 2
Xan there ya go. have at it
27th Apr 2018, 1:31 PM
annie
annie - avatar
+ 2
@xan sorry wait wrong code uploaded.
27th Apr 2018, 1:45 PM
annie
annie - avatar
0
Xan hey just a quick thing, would it be possible if u can take down the helping someone with the code. thank u very much for the help and it's appreciated but if somehow they find the code online they might say I've copied from here even tho that is my own. thanks
1st May 2018, 1:16 PM
annie
annie - avatar