working 11am , pyton code, calcaution 1 condition.
# Define attributes for each planet
planets_attributes = {
"CHA+": ["A1", "A2", "A3"], # Example attributes for CHA+
"RAH+": ["B1", "A2"],
"CHI+": ["B2", "A3"],
"MIT+": ["A4", "B3"],
"GUR+": ["A5", "C1"],
"SAN+": ["B4", "A2"],
"KET-": ["C3", "A5"],
"SUK+": ["A6", "C2"],
# Define other planets similarly...
}
# Define houses with planets
houses = {
"H1": ["CHA+"], # Only CHA+ in H1
"H2": ["RAH+", "CHI+", "MIT+", "GUR-", "SAN+", "KET-", "SUK+"],
"H3": ["KUJ-", "BHO-", "SUY+"],
"H4": ["GUR-", "BHU+"],
"H5": [], # H5 is empty
"H6": ["SAN+", "KUJ-"],
"H7": ["SUJ-", "CHA+"],
"H8": ["KUJ-", "RAH+", "CHI+", "MIT+", "GUR-", "SAN+", "KET-", "SUK+"],
"H9": ["SAY+"],
"H10": ["BHU+"],
"H11": ["BHU+"],
"H12": ["KUJ+", "SAN+", "GUR-"],
# Define remaining houses...
}
def check_h5_and_planets():
# Condition 1: H5 does not contain any planets with a "-" suffix
no_suffix_minus_in_H5 = not any(planet.endswith("-") for planet in houses["H5"])
# Condition 2: Planets with prefix GUR or CHA are present in H1, H5, or H7
contains_GUR_or_CHA = any(
planet.startswith("GUR") or planet.startswith("CHA")
for house in ["H1", "H5", "H7"]
for planet in houses[house]
)
if no_suffix_minus_in_H5 and contains_GUR_or_CHA:
print("సంతానము ఉంది : H5 does not contain planets with '-' suffix and planets with prefix GUR or CHA are present in H1, H5, or H7.")
else:
print("సంతానము లేదు: The condition is not met.")
# Additional checks for H5:
if any(planet.startswith("GUR") for planet in houses["H5"]):
print("Boy child (H5 contains GUR).")
elif any(planet.startswith("CHA") for planet in houses["H5"]):
print("Girl child (H5 contains CHA).")
# Example usage
check_h5_and_planets()
----------
# Example usage
def check_second_marriage():
# Check if H7 contains KET or RAH
h7_planets = houses["H7"]
ket_or_rah_in_H7 = [planet for planet in h7_planets if planet.startswith("KET") or planet.startswith("RAH")]
def check_second_marriage():
# Check if H7 contains KET or RAH
h7_planets = houses["H7"]
ket_or_rah_in_H7 = [planet for planet in h7_planets if planet.startswith("KET") or planet.startswith("RAH")]
if len(ket_or_rah_in_H7) > 0: # Check if either KET or RAH or both are present.
if len(ket_or_rah_in_H7) > 1:
# If both KET and RAH are present
print("2nd marriage or relation.")
else: # len(ket_or_rah_in_H7) == 1
# Check if there are other positive planets in H7
other_positive_planets = [planet for planet in h7_planets if planet.endswith("+") and planet not in ket_or_rah_in_H7]
if len(other_positive_planets) == 0:
# If no other positive planets are found
print("Partner died and no second relation.")
else:
# If there are other positive planets
print("Partner died and having a relation.")
else:
print("Second marriage : This case not occurs here")
# Example usage
check_second_marriage()
---------------