Showing posts with label Zodiac love score. Show all posts
Showing posts with label Zodiac love score. Show all posts

Wednesday, February 12, 2025

Check Zodiac Love Score

import tkinter as tk from tkinter import messagebox # Compatibility dictionary compatibility_matrix = { "aries": ["leo", "sagittarius", "gemini", "aquarius"], "taurus": ["virgo", "capricorn", "cancer", "pisces"], "gemini": ["libra", "aquarius", "aries", "leo"], "cancer": ["scorpio", "pisces", "taurus", "virgo"], "leo": ["aries", "sagittarius", "gemini", "libra"], "virgo": ["taurus", "capricorn", "cancer", "scorpio"], "libra": ["gemini", "aquarius", "leo", "sagittarius"], "scorpio": ["cancer", "pisces", "virgo", "capricorn"], "sagittarius": ["aries", "leo", "libra", "aquarius"], "capricorn": ["taurus", "virgo", "scorpio", "pisces"], "aquarius": ["gemini", "libra", "aries", "sagittarius"], "pisces": ["cancer", "scorpio", "taurus", "capricorn"] } # Function to calculate love score def get_love_score(zodiac1, zodiac2): zodiac1 = zodiac1.lower() zodiac2 = zodiac2.lower() if zodiac1 == zodiac2: return 90 elif zodiac2 in compatibility_matrix.get(zodiac1, []): return 80 else: return 50 # Function to handle button click def calculate_score(): z1 = entry1.get().strip() z2 = entry2.get().strip() if not z1 or not z2: messagebox.showerror("Input Error", "Please enter both zodiac signs.") return score = get_love_score(z1, z2) result_label.config(text=f"❤️ Love score between {z1.title()} and {z2.title()} is: {score}/100") # GUI setup root = tk.Tk() root.title("Zodiac Love Score") root.geometry("400x250") tk.Label(root, text="Enter First Zodiac Sign:").pack(pady=5) entry1 = tk.Entry(root) entry1.pack(pady=5) tk.Label(root, text="Enter Second Zodiac Sign:").pack(pady=5) entry2 = tk.Entry(root) entry2.pack(pady=5) tk.Button(root, text="Calculate Love Score ❤️", command=calculate_score).pack(pady=10) result_label = tk.Label(root, text="", font=("Arial", 12)) result_label.pack(pady=10) root.mainloop()