-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcalc.py
More file actions
74 lines (44 loc) · 1.53 KB
/
Copy pathcalc.py
File metadata and controls
74 lines (44 loc) · 1.53 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#this is the part where we are going to shuffle and generate password
#python 'random' module is used here to pick random from letters,numbers and punctuations
#then it is re shuffled by string_utilis
#remember that in order to use string_utilis you have to install it first.check readme.md.
import random
import string
import string_utils
def main1():
letter = list(string.ascii_letters)
punct = list(string.punctuation)
num = 6,3,2,9,5,1,7,0,8,4
c1 = random.choice(num)
c2 = random.choice(num)
c3 = random.choice(num)
tmix = letter + punct
rnum = c1 - c2
rnum = list(range(999999))
random.shuffle(rnum)
final_num = str(random.choice(rnum))
while len(final_num) != 5:
print()
if len(final_num) > 5:
final_num = final_num[:-1]
elif len(final_num) < 5:
c1 = str(c1)
final_num = final_num + c1
elif len(final_num) == 5:
print()
tmix1 = random.choice(tmix)
tmix2 = random.choice(tmix)
tmix3 = random.choice(tmix)
tmix4 = random.choice(tmix)
tmix5 = random.choice(tmix)
tmix6 = random.choice(tmix)
tmix7 = random.choice(tmix)
tpw = [tmix1 + tmix2 + tmix3 + tmix4 + tmix5 + tmix6 + tmix7 + final_num]
random.shuffle(tpw)
strpw = ' '.join([str(elem) for elem in tpw])
u2pw = string_utils.shuffle(strpw)
u1pw = string_utils.shuffle(u2pw)
global vpw
vpw = string_utils.shuffle(u1pw)
print(vpw)
main1()