import random

class Quiz:
    def __init__(self, questions):
        self.questions = questions
        self.score = 0

    def display_question(self, question):
        print(question['question'])
        for idx, choice in enumerate(question['choices'], start=1):
            print(f"{idx}. {choice}")
    
    def check_answer(self, question, answer):
        if question['answer'] == answer:
            print("Correct!")
            self.score += 1
        else:
            print("Incorrect!")
        print(f"Correct answer: {question['choices'][question['answer']]}")
    
    def run_quiz(self, num_questions):
        random.shuffle(self.questions)
        for question in self.questions[:num_questions]:
            self.display_question(question)
            user_answer = input("Enter your choice: ")
            self.check_answer(question, int(user_answer) - 1)
        print(f"Quiz complete! Your score: {self.score}/{num_questions}")

# Sample quiz questions
questions = [
    {
        'question': "What is 2 + 2?",
        'choices': ["3", "4", "5", "6"],
        'answer': 1
    },
    {
        'question': "What is 3 * 5?",
        'choices': ["12", "15", "18", "20"],
        'answer': 1
    },
    {
        'question': "What is 10 / 2?",
        'choices': ["2", "4", "5", "10"],
        'answer': 1
    }
]

# Create a quiz instance
quiz = Quiz(questions)

# Run the quiz with 2 questions
quiz.run_quiz(2)