FLAMES Program in Python
Program:
# Program developed by ARUN # © Copyrights owned by DATA DEMONS print("*********HELLO*********") word = list("FLAMES") name1 = input("Enter name 1 :") name1 = name1.lower() name2 = input("Enter name 2 :") name2 = name2.lower() name1List, name2List = [], [] for i in name1: if i != ' ': name1List.append(i) for j in name2: if j != ' ': name2List.append(j) count = 0 totalList = [] for k in name1List: count = 0 if k not in name2List: totalList.append(k) else: c1 = name1List.count(k) c2 = name2List.count(k) count += c1+c2 if count % 2 != 0: totalList.append(k) for l in name2List: if l not in name1List: totalList.append(l) totalListLen = len(totalList) while len(word) > 1: if totalListLen <= len(word): word.remove(word[totalListLen -1]) A = word[:totalListLen-1] B = word[totalListLen-1:] word= B + A else: d = totalListLen % len(word) word.remove(word[d-1]) A = word[d-1:] B = word[:d-1] word = A+B if word[-1] == 'F': print('You both are FRIEND') elif word[-1] == 'L': print('You both are in LOVE') elif word[-1] == 'A': print("Its AFFECTION") elif word[-1] == 'M': print("You both gonna MARRIAGE") elif word[-1] == 'E': print("You both are ENEMIES") else: print("You both are BROTHER AND SISTER")
Programmer details : Arun Meyyappan PL
Software used: PyCharm
Version : 2022.3.1
Documents and files download link
Python File(.py)
Text File(.txt)
0 Comments