ReciHub / FunnyAlgorithms

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

simpler python code for beginners #1279

Open parthivghose2919 opened 1 year ago

parthivghose2919 commented 1 year 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 1 year 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!!!!!!