7 Is your password secure?

This chapter covers
- Checking if an input matches a value
- Creating and using for loops
- Using elif not to check and respond to a condition
- Using any() to return an outcome based on any individual letter in a password meeting a condition
Did you know that it takes a supercomputer less than one second to crack a seven-character password that contains only lowercase letters! In contrast, it takes nearly 200 years to crack a 12-character password made up of lower- and uppercase letters. However, most systems limit the number of times that you can enter an incorrect password before the system locks you out. This means that even though it takes less than one second to crack a weak password, on the third attempt the system would lock out the user.
Since passwords are used everywhere for protecting data and keeping information safe and secret, it is essential that your passwords are secure.
If you want a secure password that is easy to remember but hard to guess, then the password should meet at least the following criteria:
- At least eight characters in length. (Special characters can be included for more security and we will explore this later on)
- Contains at least one uppercase letter.
- Contains at least one lowercase letter.
- Contains at least one number (known as a digit).