Question: def get_numerology_compatibility(bday_num1: int, bday_num2: int, num_compatibility_table: list) -> int: Return the compatibility percentage (one of `HIGH_COMPATIBILITY`, `LOW_COMPATIBILITY`, and `MID_COMPATIBILITY`) for `bday_num1` and `bday_num2`, which

def get_numerology_compatibility(bday_num1: int, bday_num2: int, num_compatibility_table: list) -> int: """ Return the compatibility percentage (one of `HIGH_COMPATIBILITY`, `LOW_COMPATIBILITY`, and `MID_COMPATIBILITY`) for `bday_num1` and `bday_num2`, which are the numerology numbers of two birthdays, according to the numerological compatibility data in `num_compatibility_table`.

If `bday_num2` is in the high compatibility list of `bday_num1`, return `HIGH_COMPATIBILITY`.

If `bday_num2` is in the low compatibility list of `bday_num1`, return `LOW_COMPATIBILITY`.

Otherwise, the second number is mildly compatible with the first number, so return MID_COMPATIBILITY. Note that if the first number is not in `num_compatibility_table` this rule applies.

>>> sample_compatibility = [[9, [3, 6], [4]], [3, [3, 6, 9], []]] >>> get_numerology_compatibility(9, 11, sample_compatibility) 60

>>> get_numerology_compatibility(3, 6, sample_compatibility) 100

>>>

""" # TODO: add a docstring example above for a LOW_COMPATIBILITY result

# TODO: design and write the function body

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!