-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflames.py
65 lines (54 loc) · 1.99 KB
/
flames.py
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
# To eliminate common charcters
def flames(name1,name2) :
for i in range(len(name1)) :
for j in range(len(name2)) :
if name1[i] == name2[j] :
c = name1[i]
name1.remove(c)
name2.remove(c)
name3 = name1 + ["*"] + name2
return [name3, True]
name3 = name1 + ["*"] + name2
return [name3, False]
if __name__ == "__main__" :
playerOne = input("First Player Name : ")
playerOne = playerOne.lower()
playerOne.replace(" ", "")
playerOneList = list(playerOne)
playerTwo = input("Second Player Name : ")
playerTwo = playerTwo.lower()
playerTwo.replace(" ", "")
playerTwoList = list(playerTwo)
proceed = True
while proceed :
retList = flames(playerOneList, playerTwoList)
conList = retList[0]
proceed = retList[1]
starIndex = conList.index("*")
playerOneList = conList[ : starIndex]
playerTwoList = conList[starIndex + 1 : ]
theCount = len(playerOneList) + len(playerTwoList)
# list of FLAMES acronym
res = ["Friends", "Lovers", "Affection", "Marriage", "Enemies", "Siblings"]
while len(res) > 1 :
splitIndex = (theCount % len(res) - 1)
if splitIndex >= 0 :
right = res[splitIndex + 1 : ]
left = res[ : splitIndex]
res = right + left
else :
res = res[ : len(res) - 1]
# print final result
print("Relationship Status :", res[0])
if res[0]=="Friends":
print("\nNATPU🙂🙂")
elif res[0]== "Lovers":
print("\nSONAMUTHA POCHA 🤣😂")
elif res[0]== "Affection":
print("\nNO EXPLANATION🙃🙃")
elif res[0]== "Marriage":
print("\nNO COMMENTS SIMPLY WASTE🫡🫡")
elif res[0]== "Enemies":
print("\nALL THE BEST 😵💫😵")
else:
print("🤩🤩🤩🤩")