Skip to content

Latest commit

 

History

History
21 lines (12 loc) · 658 Bytes

random_password.md

File metadata and controls

21 lines (12 loc) · 658 Bytes

Lab 6: Password Generator

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.

Concepts Covered

  • input, print
  • looping
  • random.choice
  • the 'string builder pattern'

Version 2

Allow the user to enter the value of n, remember to convert its type, as input returns a string.

Version 3 (optional)

Ask the user for how many lowercase letters, uppercase letters, numbers, and special characters they'd like in their password. Generate a password accordingly.