Answered step by step
Verified Expert Solution
Question
1 Approved Answer
SIGN_GROUPS = '[ARI,LEO,SAG]-[TAU,VIR,CAP]-[GEM,LIB,AQU]-[PIS,SCO,CAN] def find_astrological_compatibility(sign_1, sign_2): ''' (str, str) -> int Given two 3-character strings representing star signs, return an int representing how compatible they
SIGN_GROUPS = '[ARI,LEO,SAG]-[TAU,VIR,CAP]-[GEM,LIB,AQU]-[PIS,SCO,CAN]
def find_astrological_compatibility(sign_1, sign_2): ''' (str, str) -> int Given two 3-character strings representing star signs, return an int representing how compatible they are. According to Bob's rules, the compatibility between signs is calculated based on the SIGN_GROUPS they belong in, as follows: - If the signs are in the same group, return 100 - If both the signs are in an odd-numbered group (i.e. 1 and 3) OR if both are in an even group (i.e. 0 and 2), then return 70 - For all other cases, return 50 >>> find_astrological_compatibility('ARI', 'LEO') 100 >>> find_astrological_compatibility('GEM', 'LIB') 100 >>> find_astrological_compatibility('SAG', 'AQU') 70 >>> find_astrological_compatibility('VIR', 'PIS') 70 >>> find_astrological_compatibility('LEO', 'TAU') 50 >>> find_astrological_compatibility('AQU', 'SCO') 50 '''
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started