JIT
create a fun quiz about the k-pop group whitepink
```python def run_quiz(): """Runs a quiz about the K-pop group WHITEPINK.""" # Use a dictionary to store the questions and answers questions = [ { "question": "What is the name of the Whitepink member that has gone on hiatus?", "options": ["A. Hana", "B. Yumee", "C. Siyeon", "D. Estella"], "answer": "B" }, { "question": "Which Whitepink member's representative animal is a cat? 🐱", "options": ["A. Tyejyoung", "B. Hana", "C. Siyeon", "D. Kerijan"], "answer": "C" }, { "question": "What is the debut date of Whitepink?", "options": ["A. February 1st, 2015", "B. May 29th, 2017", "C. May 29th, 2026", "D. February 12th, 1997"], "answer": "A" }, { "question": "How long did Hana train before debuting?", "options": ["A. 6 years", "B. 7 years", "C. 7 and a half years", "D. 13 years"], "answer": "D" } ] score = 0 total_questions = len(questions) print("Welcome to the WHITEPINK Quiz! 💖") print("-" * 30) # Loop through each question for i, q in enumerate(questions): print(f"Question {i + 1}: {q['question']}") for option in q['options']: print(option) user_answer = input("Enter your answer (A, B, C, or D): ").strip().upper() if user_answer == q['answer']: print("Correct! ✅") score += 1 else: print(f"Incorrect. The correct answer was {q['answer']}. ❌") print("-" * 30) print(f"Quiz complete! You got {score} out of {total_questions} questions correct.") # Calculate the percentage and grade percentage = (score / total_questions) * 100 print(f"Your score is: {percentage:.2f}%") if percentage == 100: grade = "S+" elif percentage >= 90: grade = "A+" elif percentage >= 80: grade = "A" elif percentage >= 70: grade = "B" elif percentage >= 60: grade = "C" elif percentage >= 50: grade = "D" else: grade = "F-" print(f"Your grade is: {grade}") print("Thanks for playing! ✨") # Run the quiz if __name__ == "__main__": run_quiz() ```
Updated files
v1