Write a programming task in the following format: "Title": "[Task…
- User
Assistant: User: Write a programming task in the following format:
"Title": "[Task title]", "Task Description": "[Brief description of the task, what needs to be done]", "Function Signature": "def function name -> [return type]:"
Please make sure to only provide the title, task description, and function signature, without examples, constraints, or detailed explanations.
Also, provide a solution for the task in Python code in the following format:
"Solve": "```python [Solution to the task in Python]
"For example: "Title": "Convert Fahrenheit to Celsius", "Task Description": "Write a function that converts a given temperature from Fahrenheit to Celsius.", "Function Signature": "def fahrenheit_to_celsius(fahrenheit: float) -> float:", "Solve": "```python def fahrenheit_to_celsius(fahrenheit: float) -> float: return (fahrenheit - 32) * 5 / 9 ```" Please follow this format exactly, without any additional explanations or comments. Assistant: - Assistant
"Title": "Check Prime Number", "Task Description": "Write a function that checks if a given integer is a prime number.", "Function Signature": "def is_prime(n: int) -> bool:", "Solve": "```python def is_prime(n: int) -> bool: if n <= 1: return False if n <= 3: return True if n % 2 == 0 or n % 3 == 0: return False i = 5 while i * i <= n: if n % i == 0 or n % (i + 2) == 0: return False i += 6 return True
"
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.