ExercisesPythonGrPA 4 Function BasicsGrPA 4 Function BasicsWeek 4 GrPAGrPA 4 Function Basics 👨💻 QUESTIONTEST CASESSOLUTIONInstructionsQuestion ❓ Implement the below functions as per the docstrings.Python Code 🐍 1 2 3 4 5 6 7 8 9 10 11 12 13 14 def swap_halves(items): ... def swap_at_index(items,k): ... def rotate_k(items,k=1): ... def first_and_last_index(items,elem): ... def reverse_first_and_last_halves(items): ...Python Code Solution ✅ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 def swap_halves(items): mid = len(items) // 2 return items[mid:] + items[:mid] def swap_at_index(items, k): return items[k+1:] + items[:k+1] def rotate_k(items, k=1): n = len(items) k = k % n return items[-k:] + items[:-k] def first_and_last_index(items, elem): return (items.index(elem), len(items) - 1 - items[::-1].index(elem)) def reverse_first_and_last_halves(items): n = len(items) mid = n // 2 items[:mid] = items[:mid][::-1] items[mid:] = items[mid:][::-1]GrPA 3 Nested LoopsGrPA 4 lambda, zip, enumerate, map, filterMore QuestionsGrPA 1 Basic Collections Week 4 GrPAGradedGrPA 1 Basic Collections 👨💻 QUESTIONTEST CASESSOLUTION Instructions Question ❓ Implement the below functions as per the docstrings.GrPA 1 Dictionary Basics Week 5 GrPAGradedGrPA 1 Dictionary Basics 👨💻 QUESTIONTEST CASESSOLUTION Instructions Question ❓ 🫵 You are tasked with implementing a series of functions that perform various operations on dictionaries in Python. These functions will manipulate dictionaries that represent fruit prices and perform different operations as specified.GrPA 1 Numbers (Arithemetic) Week 1 GrPAGradedGrPA 1 Numbers (Arithemetic) Graded 👨💻 QUESTIONTEST CASESSOLUTION Change in eligibility criteria to write oppe1 exam: A1>=40/100 AND A2>=40/100 AND A3>=40/100 AND A4>=40/100GrPA 1 While Loop Week 3 GrPAGradedGrPA 1 While Loop Graded 👨💻 QUESTIONTEST CASESSOLUTION Instructions Question ❓ Implement different parts of a multi-functional program based on an initial input value. Each part of the program will handle various tasks related to accumulation, filtering, mapping, and combinations of these operations. None of the tasks should use explicit loops for definite repetitions, and the program should handle indefinite inputs gracefully.GrPA 2 Dictionary Application Week 5 GrPAGradedGrPA 2 Dictionary Application 👨💻 QUESTIONTEST CASESSOLUTION Instructions Question ❓ Implement the below functions as per the docstrings.GrPA 2 For Loop Week 3 GrPAGradedGrPA 2 For Loop Graded 👨💻 QUESTIONTEST CASESSOLUTION Instructions Question ❓ Write a multi functional program that takes input task from standard input and does the corresponding taks accordingly. Note that the useage of for loop is not allowed in this exercise.GrPA 2 Operations on list and set Week 4 GrPAGradedGrPA 2 Operations on list and set 👨💻 QUESTIONTEST CASESSOLUTION Instructions Question ❓ Implement the below functions as per the docstrings.GrPA 3 Composing functions Week 5 GrPAGradedGrPA 3 Composing functions 👨💻 QUESTIONTEST CASESSOLUTION Instructions Question ❓ Implement all the given functions that are used to solve the below problems.