No case, Yes case, Luck case PY CODE, JYOTHI SYA.
def check_cha_and_planets():
# Condition 1: 'CHA' is NOT in house H3, H7, or H9
cha_in_H3_H7_H11 = all("CHA" not in houses.get(house, []) for house in ["H3", "H7", "H11"])
cha_in_H1_H5_H9 = all("CHA" in houses.get(house, []) for house in ["H1", "H5", "H9"])
cha_in_H3_H7_H11 = all("CHA" in houses.get(house, []) for house in ["H3", "H7", "H11"])
# Condition 2: Find the house where 'CHA' exists and check if the opposite sign is present in that house
cha_house = None
cha_opposite_sign_present = False
for house, planets in houses.items():
# Look for CHA in the planets list
cha_planet = next((planet for planet in planets if planet.startswith("CHA")), None)
if cha_planet:
cha_house = house # Store the house number where 'CHA' is found
cha_sign = cha_planet[-1] # Extract the sign of CHA ('+' or '-')
# Determine the opposite sign
opposite_sign = '+' if cha_sign == '-' else '-'
# Check if any planet in the same house has the opposite sign
cha_opposite_sign_present = any(planet.endswith(opposite_sign) for planet in planets)
break
# Condition 3: Check if H5 has any planet with a '-' suffix (at least one '-')
# Condition 3: Check if H5 has any planet with a '-' suffix (at least one '-')
h5_has_opposite_sign = any(planet.endswith("-") for planet in houses.get("H5", []))
if not cha_in_H3_H7_H11 and not cha_opposite_sign_present and not h5_has_opposite_sign:
print(f"CHA is NOT in H3, H7, or H9, and CHA is found in {cha_house} with its opposite sign in the same house, and H5 has no planets with the opposite sign.")
print(f"Details: CHA is found in {cha_house} with sign {cha_sign}. Opposite sign present in the same house: {cha_opposite_sign_present}")
print(f"H5 planets (no opposite sign of CHA): {houses['H5']}")
else:
print("ససంతానము possible chance , check sure condition ")
# Final validation based on all conditions
if cha_in_H3_H7_H11 and cha_opposite_sign_present and h5_has_opposite_sign:
print(f"CHA is NOT in H3, H7, or H9, and CHA is found in {cha_house} with its opposite sign in the same house, and H5 has no planets with the opposite sign.")
print(f"Details: CHA is found in {cha_house} with sign {cha_sign}. Opposite sign present in the same house: {cha_opposite_sign_present}")
print(f"H5 planets (no opposite sign of CHA): {houses['H5']}")
else:
print("సంతానము తప్పకుండా ఉండే కేసు Missed , see your luck")
print("*******************************************************")
print("సంతానము తప్పకుండా ఉండే కేసు CONDITION 1 + 2 + 3")
print("Condition 1:")
if cha_in_H3_H7_H11:
print(f"Condition 1: CHA not found in H3, H7, or H10: {[house for house in ['H3', 'H7', 'H10'] if 'CHA' in houses.get(house, [])]}")
print("AND Condition 2:")
if cha_opposite_sign_present:
print(f"Condition 2: CHA is found in {cha_house}, but there are no planets with the opposite sign.")
print("AND Condition 3:")
if h5_has_opposite_sign:
print(f"Condition 3: H5 contains planets with a '-' sign: {houses['H5']}")
# Example of house data
houses = {
"H1": ["GUR+", "CHA-"],
"H3": [],
"H5": ["GUR-","CHA+"], # H5 contains a planet with a '-'
"H7": ["GUR+"],
"H9": [],
"H11": ["CHA+"]
}
# Call the function
check_cha_and_planets()