online digital password generator -paper

BEING SECURE

In today’s digital world, we all have multiple (I mean MANY, MANY, MANY) passwords that keep our personal digital information secure.

Unfortunately, most of us fall into the bad habit of using the same password for more than one account. This practice allows for easy access by hackers. Yes, this includes me!

Reportedly in 2019, 80% of hacking-related breaches were tied to password security. So with that being said, now is the perfect time to review your passwords.

To find a list of your compromised personal accounts, you can visit ‘:–have i been pwned?. By inserting your email address, the website lists the applications in which your personal data was unintentionally exposed to the public. You might be surprised!

This Python coding project helps you create a random password that you can use to help keep your digital information more secure. The Python code allows the user to dictate the number of characters, numbers, and symbols and then places them in random order. So now there are no more excuses for poor passwords.

Passwords are like underwear: you don’t let people see it, you should change it very often, and you shouldn’t share it with strangers.— Chris Pirillo

LOOPING THE LOOP

This project represents Day 5 of the #100 Days of Coding Challenge.

It uses “for” loops that allow for iteration of the same lines of code. The number of times it repeats the actions can be determined by the number of items in a list, a range, or more. In addition, “for” loops allow for a catch-all “else” statement, and they can also be nested within one another.

This “Password Generator” forms a random password by choosing the correct number of items from a list and then it shuffles the results to create a unique (and hopefully- more secure password).

Don’t get me wrong, all passwords are hackable. Hackers use free remote online tools like “Brutus” to do the job. The key is to make the password more complex. Doing so, it takes the tool too long to crack your password, so the hacker moves on to someone else with an easier password.

STAYING WITHIN THE RANGE

The Python coding knows how many characters, numbers, or symbols the user input by calling the built-in range() function.

It is used when a user needs to perform an action a specific number of times. This function can take 3 integer arguments (Start, Stop, and Step).

The range() starts with 0 if not specified and the function doesn’t include the last (stop) number in the result.

#Python range() example
print(“Numbers from range 0 to 6”)
for i in range(6):
print(i, end=’, ‘)Numbers from range 0 to 6
0, 1, 2, 3, 4, 5,

So to solve this add +1 to the Stop.

EXTENDING FURTHER

extending arrow

In this project, once the random items were chosen into their own list, they were placed into a new list with the extend() method.

Many confuse the append() and extend() methods. Append() adds an item to the end of a list but keep but if the item was a second list it keeps that list separate, whereas extend() method iterates over its argument and adding each element to the list and extending the list.

Now that is a mouthful, but if your need further clarification Geeks for Geeks website has a good explanation with examples.

If you wish to see my other coding challenges, visit the Advice & Coding page.

 PASSWORD GENERATOR – DAY 5

Give the Password Generator a try!

It is quite easy for the user as the Python coding does all the work for you.

The first part of the coding challenge was straightforward, but putting the password selections in a random order proved a little more difficult. This keeps all the characters, symbols, and numbers grouped together. I also removed the space between each item in the list for a more aesthetic appearance. If one wished to take the coding a step further, using the shuffle() method could reorder the new list if the user did not like the original outcome as well as include error messages when input is something other than an integer.

For now, just remember to write down your new passwords or save them in a password manager.

Start click the green button below. To restart the generator click the green arrow once again. Stay safe!