Skip to content

Latest commit

 

History

History
25 lines (12 loc) · 624 Bytes

password_generator.md

File metadata and controls

25 lines (12 loc) · 624 Bytes

Password Generator

Let's generate a ten-character password using a while loop and random.choice().

The final result will be a string of random characters all on one line.

Example output:

Your password: Q45pA%x9PJ

Extra Challenge 1

Allow the user to choose how many characters the password will be.

Extra Challenge 2

Allow the user to choose how many letters, numbers, and punctuation characters they want in their password. Mix everything up using list(), random.shuffle(), and ''.join().