import random from base_generator import BaseQuestionGenerator class SeniorQuestionGenerator(BaseQuestionGenerator): def generate_question(self): ops = ["+", "-", "*", "/"] num_operands = random.randint(2, 5) nums = [str(random.randint(1, 100)) for _ in range(num_operands)] func = random.choice(["sin", "cos", "tan"]) expr = nums[0] for n in nums[1:]: expr += " " + random.choice(ops) + " " + n return f"{func}({expr})"