-
Notifications
You must be signed in to change notification settings - Fork 0
/
DictPrimeString.py
18 lines (18 loc) · 1.03 KB
/
DictPrimeString.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
alphabets = {"a": 1, "b": 2, "c": 3, "d": 4, "e": 5, "f": 6, "g": 7, "h": 8, "i": 9, "j": 10, "k": 11, "l": 12, "m": 13,
"n": 14, "o": 15, "p": 16, "q": 17, "r": 18, "s": 19, "t": 20, "u": 21, "v": 22, "w": 23, "x": 24, "y": 25,
"z": 26, "A": 1, "B": 2, "C": 3, "D": 4, "E": 5, "F": 6, "G": 7, "H": 8, "I": 9, "J": 10, "K": 11, "L": 12,
"M": 13, "N": 14, "O": 15, "P": 16, "Q": 17, "R": 18, "S": 19, "T": 20, "U": 21, "V": 22, "W": 23, "X": 24,
"Y": 25, "Z": 26}
lst = ["Selenium", "Jenkins", "Kubernetes", "Nagios", "Docker", "Ansible", "Git", "Chef", "Puppet", "Splunk", "Atom",
"Bitbucket", "Terraform", "Gradle", "Eclipse", "Trello", "Slack", "Wireshark", "Bamboo", "Maven", "Sonarqube",
"JUnit", "Jira", "Gitlab", "Confluence", "Apple", "Fun"]
print("Elements whose weightage is primenumber:")
for item in lst:
sum = 0
for letter in item:
sum += alphabets[letter]
for i in range(2, sum):
if sum % 2 == 0:
break
else:
print(item)