forked from Ishaan28malik/Hacktoberfest-2024
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
firstPerson = input() | ||
secondPerson = input() | ||
|
||
# creating an empty string to input only the non-common alphabets from both the names | ||
flameString = "" | ||
|
||
# Removing common characters from str1 which are also in str2 | ||
for i in range(len(firstPerson)): | ||
if firstPerson[i] not in secondPerson: | ||
flameString += firstPerson[i] | ||
|
||
# Removing common characters from str2 which are also in str1 | ||
for i in range(len(secondPerson)): | ||
if secondPerson[i] not in firstPerson: | ||
flameString += secondPerson[i] | ||
|
||
flamesCount = len(flameString) # Taking the length of the string after removing all the common alphabets | ||
|
||
|
||
listOfAlpha = ['Frienship', 'Love', 'Affection', 'Marriage', 'Enemy', 'Siblings'] | ||
|
||
# F - Friendship | ||
# L - Love | ||
# A - Affection | ||
# M - Marriage | ||
# E - Enemy | ||
# S - Siblings | ||
|
||
# FLAMES game logic | ||
while len(listOfAlpha) > 1: | ||
index = flamesCount % len(listOfAlpha) - 1 | ||
if index < 0: | ||
index = len(listOfAlpha) - 1 | ||
listOfAlpha = listOfAlpha[index + 1:] + listOfAlpha[:index] | ||
|
||
print("Relationship:", listOfAlpha[0]) |