Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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 Ci.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 50 >>> findastrological.compatibilityC'ARI'LEO' 100 >>> find astrological.compatibilityC'EM, 'LIB') 100 find.astrological_compatibilityC'SAG, 'AQU 70 > find.astrological.compatibilityC'VIR, 'PIS) 70 >> find astrological.compatibilityC'LEO', 'TAU 50 >>find.astrological_compatibilityC'AQU, SCO 50

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions