class ChakraAnalyzer:
def __init__(self):
self.chakras = {
'Root': 0,
'Sacral': 0,
'Solar Plexus': 0,
'Heart': 0,
'Throat': 0,
'Third Eye': 0,
'Crown': 0
}
def ask_question(self, chakra, question):
while True:
try:
rating = int(input(f"{question} (On a scale of 1 to 10): "))
if 1 <= rating <= 10:
return rating
else:
print("Please enter a valid rating between 1 and 10.")
except ValueError:
print("Please enter a valid numerical rating.")
def analyze_chakras(self):
print("Answer the following questions to assess the openness of each chakra:")
self.chakras['Root'] = self.ask_question('Root', 'How grounded do you feel in your daily life?')
self.chakras['Sacral'] = self.ask_question('Sacral', 'How well do you connect with your emotions and creativity?')
self.chakras['Solar Plexus'] = self.ask_question('Solar Plexus', 'How confident and in control do you feel?')
self.chakras['Heart'] = self.ask_question('Heart', 'How open and compassionate are you towards yourself and others?')
self.chakras['Throat'] = self.ask_question('Throat', 'How effectively do you communicate and express yourself?')
self.chakras['Third Eye'] = self.ask_question('Third Eye', 'How connected do you feel to your intuition and inner wisdom?')
self.chakras['Crown'] = self.ask_question('Crown', 'How spiritually connected do you feel to the universe?')
def identify_blocked_chakra(self):
blocked_chakras = [chakra for chakra, rating in self.chakras.items() if rating <= 5]
if not blocked_chakras:
print("All chakras are open and balanced!")
else:
print(f"The following chakras may be blocked: {', '.join(blocked_chakras)}")
if __name__ == "__main__":
analyzer = ChakraAnalyzer()
analyzer.analyze_chakras()
analyzer.identify_blocked_chakra()