Python Games Code
1. Age Calculator: year = int(input("Enter your birth year: ")) age = 2025 - year print("🎂 Your age is:", age) 2. Even Or Odd Game: num = int(input("Enter a number: ")) if num % 2 == 0: print("✅ It's Even") else: print("✅ It's Odd") 3. Quiz Game: questions = { "What is the capital of India? ": "delhi", "2 + 2 = ? ": "4", "Which language is this game written in? ": "python" } score = 0 for q, a in questions.items(): ans = input(q).lower() if ans == a: print("✅ Correct!") score += 1 else: print("❌ Wrong!") print(f"🎯 Final Score: {score}/{len(questions)}") 4. Typing Speed Test: import time print("⌨️ Typing Speed Test ⌨️") text = "Python is fun to learn and play games with" print("Type this sentence:\n", text) input("Press Enter when ready... ") s...