Skip to main content

Python library to compare two strings and return their relationship status as per Asia's famous FLAMES Game

Project description

pyflames

Python library to check two names and return their relationship status as per "FLAMES"

Flames

How it works?

What is FlamesGame?


FlamesGame is a relationship calculating algorithm famous between the youngsters. At the time of graduation everyone might heard about this and many of them tried out this secretly. Some took this as very serious also. So what FLAMES stance for?
F - Friendship
L - Love
A - Affection
M - Marriage
E - Enemy
S - Sister (Sibling)

How we can calculate the FLAMES?

It is very easy to explain with some example:
Your name: asd
Partner name: abcd

Mainly two steps are there:

  1. Get the flames count
    • Take the two names ('asd' and 'abcd')
    • Remove the common characters (two common characters 'a', 'd')
    • Get the count of the characters that are left (Removed a,d and the rest are s,b,c. So total 3.)
  2. Get the flames result
    • We take FLAMES letters ('F', 'L', 'A', 'M', 'E', 'S')
    • And start removing letters using the flames count we got.
    • And the letter which last the process is the result.

In our example we got flames count = 3. So first we takes FLAMES.
FLAMES
Then we start count from left up to flames count 3. Then remove the letter which is in the position 3. In this case it is 'A'. So the letters become:
FLMES
Then we start count again from the letter which is removed ie, from 'M'. So the next character to remove is 'S'. So our letters become:
FLME
After next step:
FLE
Then:
FE
Last:
F
So the result is 'Friend'.


So it's as simple as that!


USAGE:
From packagename import package name
Create an instance of the class
Create variable and call the flames method referencing the instance that we created


SYNTAX:

import pyflames
variable_name = pyflames.pyflames()
another_variable = variable_name.flames("name1","name2")
print(another_variable)


EXAMPLE CODE:

import pyflames
word = pyflames.pyflames()
status = word.flames("John Wick","Jennifer Aniston")
print(status)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyflames-1.4.tar.gz (3.2 kB view details)

Uploaded Source

File details

Details for the file pyflames-1.4.tar.gz.

File metadata

  • Download URL: pyflames-1.4.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.1

File hashes

Hashes for pyflames-1.4.tar.gz
Algorithm Hash digest
SHA256 89d4ca435568817ccadfda72f963a88056cbcf5984e1997d920d55080cc8f4ae
MD5 2bc55e8cfeeffc2509a62435d722c58e
BLAKE2b-256 51c2a14c0eb01492b68a445a856d08d11706d9768739ef4392bce640e44608ae

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page