-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRandom_Password_Generator.py
More file actions
24 lines (17 loc) · 1010 Bytes
/
Copy pathRandom_Password_Generator.py
File metadata and controls
24 lines (17 loc) · 1010 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import random
letters_lower = ["q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "a", "s", "d", "f", "g", "h", "j", "k", "l", "z", "x", "c",
"v" "b", "n", "m"]
letters_upper = ["Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P", "A", "S", "D", "F", "G", "H", "J", "K", "L", "Z", "X", "C",
"V", "B", "N", "M"]
numbers1 = random.randint(1, 100)
numbers2 = random.randint(1, 100)
special_characters = ["!", "£", "$", "%", "^", "&", "*", "()"]
a = random.choice(letters_lower)
b = random.choice(letters_upper)
c = random.choice(special_characters)
d = random.choice(letters_lower)
e = random.choice(letters_upper)
print("A good password for you to consider is : {}{}{}{}{}{}{}".format(b, a, c, numbers1, d, numbers2, e))
# Homework Question:
# Write a program to build a school curriculum, consisting of subjects, languages, sports and year
# Hint : Use random library, and pick 10 items for languages, 10 items for sports and 10 items for subjects