Question: SIGN-GROUPS = ' [ARI , LEO, SAG], [TAU,VIR,CAP], [GEM, LIB, AQU], [PIS, SCO, CANJ'l def find astrological.compatibility(sign1, sign2): (str, str)-int Given two 3-character strings representing

image text in transcribed
image text in transcribed
image text in transcribed
SIGN-GROUPS = ' [ARI , LEO, SAG], [TAU,VIR,CAP], [GEM, LIB, AQU], [PIS, SCO, CANJ'l def find astrological.compatibility(sign1, sign2): (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 SIGNGROUPS 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 Ci.e. 0 and 2), then return 70 - For all other cases, return 5 >>> find.astrological compatibilityC'ARILEO 100 >>>find.astrological.compatibilityC'GEM,LIB' 100 >> find astrological.compatibility'SAGAQU 70 >find astrological.compatibilitycVIR, 'PIS' 70 find astrological compatibilityCLEO,TAU) 5e bx find ostrological.compatibilityC AQU', SCO) 50 SIGN-GROUPS = ' [ARI , LEO, SAG], [TAU,VIR,CAP], [GEM, LIB, AQU], [PIS, SCO, CANJ'l def find astrological.compatibility(sign1, sign2): (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 SIGNGROUPS 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 Ci.e. 0 and 2), then return 70 - For all other cases, return 5 >>> find.astrological compatibilityC'ARILEO 100 >>>find.astrological.compatibilityC'GEM,LIB' 100 >> find astrological.compatibility'SAGAQU 70 >find astrological.compatibilitycVIR, 'PIS' 70 find astrological compatibilityCLEO,TAU) 5e bx find ostrological.compatibilityC AQU', SCO) 50

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!