Let's generate a password of length n
using a while
loop and random.choice
, this will be a string of random characters.
Hint: random.choice can be used to pick a character out of a string, as well as an element out of a list.
- input, print
- looping
- random.choice
- the 'string builder pattern'
Allow the user to enter the value of n
, remember to convert its type, as input
returns a string.
Ask the user for how many lowercase letters, uppercase letters, numbers, and special characters they'd like in their password. Generate a password accordingly.