input: Write a function to calculate a trivia score based on correct and user answers.
  assert score_trivia("Python", "python") == 10
  assert score_trivia("Programming", "Program") == 8.0
  assert score_trivia("Quiz", "question") == 0
output: def score_trivia(correct_answer, user_answer):
      correct_answer = correct_answer.lower()
      user_answer = user_answer.lower()
      
      if correct_answer == user_answer:
          return 10
      
      min_length = min(len(correct_answer), len(user_answer))
      match_score = sum(1 for i in range(min_length) if correct_answer[i] == user_answer[i])
      
      return (match_score / len(correct_answer)) * 10 if match_score > 0 else 0