gpt-4o-2024-08-06· OpenAI WildChat-4.8M (AI2)
Please generate a unique programming task in JSON format with the following structure: {…
- User
Please generate a unique programming task in JSON format with the following structure: { "Title": "Task Name", "Task Description": "Description of the task.", "Function Signature": "def function_name(parameters) -> return_type:", "Solve": "", "Input": "Description of the input parameters.", "Output": "Description of the expected output.", "Examples": [ { "input": "Example input here", "output": "Expected output here" }, { "input": "Another example input here", "output": "Another expected output here" } ] } Ensure that:
- The task includes string manipulations with multiple steps.
- The task must avoid the following titles: .
- The task should be unique and complex.
- The "Solve" section should remain empty.
- Assistant
{ "Title": "Palindrome Substring Shifter", "Task Description": "Write a function that takes a string and finds the longest palindromic substring within it. Once identified, shift the characters of this substring by a given number of positions and return the modified original string with the shifted substring.", "Function Signature": "def shift_longest_palindrome(s: str, shift: int) -> str:", "Solve": "", "Input": "A string 's' containing lowercase alphabets and an integer 'shift' representing the number of positions to shift the longest palindromic substring.", "Output": "Return the original string with its longest palindromic substring characters shifted to the right by 'shift' positions. If two palindromic substrings of maximum length exist, choose the first one.", "Examples": [ { "input": "\"babad\", 2", "output": "\"bbcda\"" }, { "input": "\"cbbd\", 1", "output": "\"cdbe\"" } ] }