Write a programming task in the following format: "Title": "[Название…
- User
Assistant: User: Write a programming task in the following format:
"Title": "[Название задачи]", "Task Description": "[Краткое описание задачи, что требуется сделать]", "Function Signature": "def имя функции -> [тип возвращаемого значения]:"
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]"
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": "def fahrenheit_to_celsius(fahrenheit: float): return (fahrenheit - 32) * 5 / 9"
Please follow this format exactly, without any additional explanations or comments.
Assistant:
- Assistant
"Title": "Reverse a String", "Task Description": "Write a function that takes a string as input and returns the string reversed.", "Function Signature": "def reverse_string(input_string: str) -> str:", "Solve": "def reverse_string(input_string: str): return input_string[::-1]"
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.