-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRNGPW2.py
More file actions
47 lines (38 loc) · 1.17 KB
/
RNGPW2.py
File metadata and controls
47 lines (38 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import random
import string
Capital_letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
LowerCase_Letters = Capital_letters.lower()
Numbers = "0123456789"
Special_Char = "!£$%^&*()"
include_capital_letters = False
include_lower_case_letters = False
include_numbers = False
include_special_chars = False
Default = ""
print("Random Password Generator" + '\n')
Q2 = input("How secure do you want your password to be? Easy, Medium, or Advanced." + '\n')
if Q2 == "Easy":
include_capital_letters = True
include_lower_case_letters = True
elif Q2 == "Medium":
include_capital_letters = True
include_lower_case_letters = True
include_numbers = True
elif Q2 == "Advanced":
include_capital_letters = True
include_lower_case_letters = True
include_numbers = True
include_special_chars = True
if include_capital_letters:
Default += Capital_letters
if include_lower_case_letters:
Default += LowerCase_Letters
if include_numbers:
Default += Numbers
if include_special_chars:
Default += Special_Char
amount = 1
length = 10
for x in range(amount):
password = "".join(random.sample(Default, length))
print(password)