Apr-05-2017, 09:41 AM
I am a student working on a password checking program, I need help with identifiying if a variable has symbols ("~`!@#$%^&*()_-+={}[]:>;',</?*-+") and add a score to the variable (Score).
Symbol identification in variables
|
Apr-05-2017, 09:41 AM
I am a student working on a password checking program, I need help with identifiying if a variable has symbols ("~`!@#$%^&*()_-+={}[]:>;',</?*-+") and add a score to the variable (Score).
Apr-05-2017, 09:43 AM
Hi, you could get in touch with your classmate working on same issue and brainstorm it together! It's a great learning strategy.
https://python-forum.io/Thread-Symbols-i...2#pid14242
Apr-05-2017, 09:48 AM
(Apr-05-2017, 09:41 AM)Ollie Wrote: I am a student working on a password checking program, I need help with identifiying if a variable has symbols ("~`!@#$%^&*()_-+={}[]:>;',</?*-+") and add a score to the variable (Score).symbols = "~`!@#$%^&*()/_-+={}[]:>;',</?*-+" contains_symbol = False for symbols in symbols: if symbols in pw1: contains_symbol = True Score+=10 break print(contains_symbol) |
|