ReciHub / FunnyAlgorithms

A repository with a bunch of funny algorithms, beginners friendly
Creative Commons Zero v1.0 Universal
441 stars 700 forks source link

simpler python code for beginners #1279

Open parthivghose2919 opened 10 months ago

parthivghose2919 commented 10 months ago

-Does not use any additional libraries. -Defines a calculate_flames function that takes two names as input. -Converts names to lowercase and removes spaces. -Creates dictionaries to count the frequency of each letter in both names. -Calculates the total count of common letters in both names. -Uses a while loop to iteratively remove one letter from the FLAMES string based on the total count until only one letter remains. -Defines a dictionary to map each letter of FLAMES to a corresponding relationship status. -Returns the relationship corresponding to the remaining letter in FLAMES

parthivghose2919 commented 10 months ago

Hey @ReciHubBot Please Accept the PR where in I have addresed the issue #1137 and made changes in the previous code to make it simpler and beginner friendly...ThankYou!!!!!!