meetforever/GRPO_CL huggingface dataset:
user: A [Power Law](https://en.wikipedia.org/wiki/Power_law) distribution occurs whenever "a relative change in one quantity results in a proportional relative change in the other quantity." For example, if *y* = 120 when *x* = 1 and *y* = 60 when *x* = 2 (i.e. *y* halves whenever *x* doubles) then when *x* = 4, *y* = 30 and when *x* = 8, *y* = 15.


Therefore, if I give you any pair of co-ordinates (x1,y1) and (x2,y2) in a power law distribution, you can plot the entire rest of the distribution and tell me the value of *y* for any other value of *x*. 

Given a pair of co-ordinates (x1,y1) and (x2,y2) and another x co-ordinate *x3*, return the value of *y3*

```
powerLaw(x1y1, x2y2, x3)
e.g. powerLaw([1,120], [2,60], 4)
- when x = 1, y = 120
- when x = 2, y = 60
- therefore whenever x doubles, y halves
- therefore when x = 4, y = 60 * 0.5
- therfore solution = 30
```

(x1,y1) and (x2,y2) will be given as arrays. Answer should be to the nearest integer, but random tests will give you leeway of 1% of the reference solution to account for possible discrepancies from different methods.

Answer: {"fn_name": "power_law", "inputs": [[[1, 120], [2, 60], 4], [[1, 120], [2, 60], 8], [[1, 120], [4, 30], 8], [[1, 120], [3, 60], 9], [[1, 120], [3, 60], 27], [[1, 120], [9, 30], 27], [[1, 81], [2, 27], 4], [[1, 81], [2, 27], 8], [[1, 81], [4, 9], 8], [[1, 81], [5, 27], 25], [[1, 81], [5, 27], 125], [[1, 81], [25, 9], 125], [[4, 30], [2, 60], 1], [[5, 27], [1, 81], 1], [[4, 9], [8, 3], 1], [[1, 120], [1, 120], 1], [[4, 99], [4, 99], 4], [[9, 1], [9, 1], 9]], "outputs": [[30], [15], [15], [30], [15], [15], [9], [3], [3], [9], [3], [3], [120], [81], [81], [120], [99], [1]]}
user: # SpeedCode #2 - Array Madness

## Objective

Given two **integer arrays** ```a, b```, both of ```length >= 1```, create a program that returns ```true``` if the **sum of the squares** of each element in ```a``` is **strictly greater than** the **sum of the cubes** of each element in ```b```.

E.g.
```python
array_madness([4, 5, 6], [1, 2, 3]) => True #because 4 ** 2 + 5 ** 2 + 6 ** 2 > 1 ** 3 + 2 ** 3 + 3 ** 3
```
Get your timer out.  Are you ready?  Ready, get set, GO!!!

Answer: {"fn_name": "array_madness", "inputs": [[[4, 5, 6], [1, 2, 3]]], "outputs": [[true]]}
user: Simple enough this one - you will be given an array. The values in the array will either be numbers or strings, or a mix of both. You will not get an empty array, nor a sparse one.

Your job is to return a single array that has first the numbers sorted in ascending order, followed by the strings sorted in alphabetic order. The values must maintain their original type. 

Note that numbers written as strings are strings and must be sorted with the other strings.

Answer: {"fn_name": "db_sort", "inputs": [[[6, 2, 3, 4, 5]], [[14, 32, 3, 5, 5]], [[1, 2, 3, 4, 5]], [["Banana", "Orange", "Apple", "Mango", 0, 2, 2]], [["C", "W", "W", "W", 1, 2, 0]], [["Hackathon", "Katathon", "Code", "CodeWars", "Laptop", "Macbook", "JavaScript", 1, 5, 2]], [[66, "t", 101, 0, 1, 1]], [[78, 117, 110, 99, 104, 117, 107, 115, 4, 6, 5, "west"]], [[101, 45, 75, 105, 99, 107, "y", "no", "yes", 1, 2, 4]], [[80, 117, 115, 104, 45, 85, 112, 115, 6, 7, 2]], [[1, 1, 1, 1, 1, 2, "1", "2", "three", 1, 2, 3]], [[78, 33, 22, 44, 88, 9, 6, 0, 5, 0]], [[1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3]], [[82, 18, 72, 1, 11, 12, 12, 12, 12, 115, 667, 12, 2, 8, 3]], [["t", "e", "s", "t", 3, 4, 1]], [["what", "a", "great", "kata", 1, 2, 2]], [[66, "codewars", 11, "alex loves pushups", 2, 3, 0]], [["come", "on", 110, "2500", 10, "!", 7, 15, 5, 6, 6]], [["when's", "the", "next", "Katathon?", 9, 7, 0, 1, 2]], [[8, 7, 5, "bored", "of", "writing", "tests", 115, 6, 7, 0]], [["anyone", "want", "to", "hire", "me?", 2, 4, 1]]], "outputs": [[[2, 3, 4, 5, 6]], [[3, 5, 5, 14, 32]], [[1, 2, 3, 4, 5]], [[0, 2, 2, "Apple", "Banana", "Mango", "Orange"]], [[0, 1, 2, "C", "W", "W", "W"]], [[1, 2, 5, "Code", "CodeWars", "Hackathon", "JavaScript", "Katathon", "Laptop", "Macbook"]], [[0, 1, 1, 66, 101, "t"]], [[4, 5, 6, 78, 99, 104, 107, 110, 115, 117, 117, "west"]], [[1, 2, 4, 45, 75, 99, 101, 105, 107, "no", "y", "yes"]], [[2, 6, 7, 45, 80, 85, 104, 112, 115, 115, 117]], [[1, 1, 1, 1, 1, 1, 2, 2, 3, "1", "2", "three"]], [[0, 0, 5, 6, 9, 22, 33, 44, 78, 88]], [[1, 1, 2, 2, 3, 3, 4, 5, 6, 7, 8, 9]], [[1, 2, 3, 8, 11, 12, 12, 12, 12, 12, 18, 72, 82, 115, 667]], [[1, 3, 4, "e", "s", "t", "t"]], [[1, 2, 2, "a", "great", "kata", "what"]], [[0, 2, 3, 11, 66, "alex loves pushups", "codewars"]], [[5, 6, 6, 7, 10, 15, 110, "!", "2500", "come", "on"]], [[0, 1, 2, 7, 9, "Katathon?", "next", "the", "when's"]], [[0, 5, 6, 7, 7, 8, 115, "bored", "of", "tests", "writing"]], [[1, 2, 4, "anyone", "hire", "me?", "to", "want"]]]}
user: Given a sequence of numbers, find the largest pair sum in the sequence.

For example
```
[10, 14, 2, 23, 19] -->  42 (= 23 + 19)
[99, 2, 2, 23, 19]  --> 122 (= 99 + 23)
```

Input sequence contains minimum two elements and every element is an integer.

Answer: {"fn_name": "largest_pair_sum", "inputs": [[[10, 14, 2, 23, 19]], [[-100, -29, -24, -19, 19]], [[1, 2, 3, 4, 6, -1, 2]], [[-10, -8, -16, -18, -19]]], "outputs": [[42], [0], [10], [-18]]}
user: # Task

You are given an array `a` of positive integers a. You may choose some integer `X` and update `a` several times, where to update means to perform the following operations:
```
pick a contiguous subarray of length not greater than the given k;
replace all elements in the picked subarray with the chosen X.
```
What is the minimum number of updates required to make all the elements of the array the same?

# Example

For `a = [1, 2, 2, 1, 2, 1, 2, 2, 2, 1, 1, 1] and k = 2`, the output should be `4`.

Here's how a will look like after each update:
```
[1, 2, 2, 1, 2, 1, 2, 2, 2, 1, 1, 1] ->
[1, 1, 1, 1, 2, 1, 2, 2, 2, 1, 1, 1] ->
[1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1] ->
[1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1] ->
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
```


# Input/Output


 - `[input]` integer array `a`

  An array of positive integers.

  Constraints:
  
  `10 ≤ a.length ≤ 50,`
  
  `1 ≤ a[i] ≤ 10.`
  

 - `[input]` integer `k`

  A positive integer, the maximum length of a subarray.

  Constraints: `2 ≤ k ≤ 9.`


 - `[output]` an integer

  The minimum number of updates.

Answer: {"fn_name": "array_equalization", "inputs": [[[1, 2, 2, 1, 2, 1, 2, 2, 2, 1, 1, 1], 2], [[5, 2, 3, 5, 2, 2, 3, 5, 1, 2, 5, 1, 2, 5, 3], 7], [[1, 2, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1], 9]], "outputs": [[4], [2], [1]]}
user: In this kata you are given an array to sort but you're expected to start sorting from a specific position of the array (in ascending order) and optionally you're given the number of items to sort.

#### Examples:

```python
sect_sort([1, 2, 5, 7, 4, 6, 3, 9, 8], 2) //=> [1, 2, 3, 4, 5, 6, 7, 8, 9]
sect_sort([9, 7, 4, 2, 5, 3, 1, 8, 6], 2, 5) //=> [9, 7, 1, 2, 3, 4, 5, 8, 6]
```

#### Documentation:

```python
sect_sort(array, start, length);
```

- array - array to sort
- start - position to begin sorting
- length - number of items to sort (optional)

if the **length** argument is not passed or is zero, you sort all items to the right of the start postiton in the array

Answer: {"fn_name": "sect_sort", "inputs": [[[1, 2, 5, 7, 4, 6, 3, 9, 8], 2], [[1, 2, 5, 7, 4, 6, 3, 9, 8], 8], [[9, 7, 4, 2, 5, 3, 1, 8, 6], 2, 5], [[1, 2, 5, 7, 4, 6, 3, 9, 8], 8, 3], [[], 0]], "outputs": [[[1, 2, 3, 4, 5, 6, 7, 8, 9]], [[1, 2, 5, 7, 4, 6, 3, 9, 8]], [[9, 7, 1, 2, 3, 4, 5, 8, 6]], [[1, 2, 5, 7, 4, 6, 3, 9, 8]], [[]]]}
user: "Point reflection" or "point symmetry" is a basic concept in geometry where a given point, P, at a given position relative to a mid-point, Q has a corresponding point, P1, which is the same distance from Q but in the opposite direction.

## Task

Given two points P and Q, output the symmetric point of point P about Q.
Each argument is a two-element array of integers representing the point's X and Y coordinates.  Output should be in the same format, giving the X and Y coordinates of point P1.  You do not have to validate the input.

This kata was inspired by the Hackerrank challenge [Find Point](https://www.hackerrank.com/challenges/find-point)

Answer: {"fn_name": "symmetric_point", "inputs": [[[0, 0], [1, 1]], [[2, 6], [-2, -6]], [[10, -10], [-10, 10]], [[1, -35], [-12, 1]], [[1000, 15], [-7, -214]], [[0, 0], [0, 0]]], "outputs": [[[2, 2]], [[-6, -18]], [[-30, 30]], [[-25, 37]], [[-1014, -443]], [[0, 0]]]}
user: Consider a sequence made up of the consecutive prime numbers. This infinite sequence would start with: 
```python
"2357111317192329313741434753596167717379..."
```

You will be given two numbers: `a` and `b`, and your task will be to return `b` elements starting from index `a` in this sequence.
```
For example:
solve(10,5) == `19232` Because these are 5 elements from index 10 in the sequence.
```

Tests go up to about index `20000`.

More examples in test cases. Good luck!

Please also try [Simple time difference](https://www.codewars.com/kata/5b76a34ff71e5de9db0000f2)

Answer: {"fn_name": "solve", "inputs": [[2, 2], [10, 5], [10, 3], [20, 9], [30, 12], [40, 8], [50, 6], [10000, 5], [20000, 5]], "outputs": [["57"], ["19232"], ["192"], ["414347535"], ["616771737983"], ["83899710"], ["031071"], ["02192"], ["09334"]]}
user: Cheesy Cheeseman just got a new monitor! He is happy with it, but he just discovered that his old desktop wallpaper no longer fits. He wants to find a new wallpaper, but does not know which size wallpaper he should be looking for, and alas, he just threw out the new monitor's box. Luckily he remembers the width and the aspect ratio of the monitor from when Bob Mortimer sold it to him. Can you help Cheesy out?
# The Challenge

Given an integer `width` and a string `ratio` written as `WIDTH:HEIGHT`, output the screen dimensions as a string written as `WIDTHxHEIGHT`.

Answer: {"fn_name": "find_screen_height", "inputs": [[1024, "4:3"], [1280, "16:9"], [3840, "32:9"], [1600, "4:3"], [1280, "5:4"], [2160, "3:2"], [1920, "16:9"], [5120, "32:9"]], "outputs": [["1024x768"], ["1280x720"], ["3840x1080"], ["1600x1200"], ["1280x1024"], ["2160x1440"], ["1920x1080"], ["5120x1440"]]}
user: Peter can see a clock in the mirror from the place he sits in the office.
When he saw the clock shows 12:22



1
2
3
4
5
6
7
8
9
10
11
12




He knows that the time is 11:38



1
2
3
4
5
6
7
8
9
10
11
12




in the same manner:

05:25 --> 06:35

01:50 --> 10:10

11:58 --> 12:02

12:01 --> 11:59

Please complete the function `WhatIsTheTime(timeInMirror)`, where `timeInMirror` is the mirrored time (what Peter sees) as string.

Return the _real_ time as a string.

Consider hours to be between 1 <= hour < 13.

So there is no 00:20, instead it is 12:20.

There is no 13:20, instead it is 01:20.

Answer: {"fn_name": "what_is_the_time", "inputs": [["06:35"], ["11:59"], ["12:02"], ["04:00"], ["06:00"], ["12:00"]], "outputs": [["05:25"], ["12:01"], ["11:58"], ["08:00"], ["06:00"], ["12:00"]]}
user: Given a string, you progressively need to concatenate the first letter from the left and the first letter to the right and "1", then the second letter from the left and the second letter to the right and "2", and so on.

If the string's length is odd drop the central element.

For example:
```python
char_concat("abcdef")    == 'af1be2cd3'
char_concat("abc!def")   == 'af1be2cd3' # same result
```

Answer: {"fn_name": "char_concat", "inputs": [["abc def"], ["CodeWars"], ["CodeWars Rocks"], ["1234567890"], ["$'D8KB)%PO@s"]], "outputs": [["af1be2cd3"], ["Cs1or2da3eW4"], ["Cs1ok2dc3eo4WR5a 6rs7"], ["101292383474565"], ["$s1'@2DO38P4K%5B)6"]]}
user: You know how sometimes you write the the same word twice in a sentence, but then don't notice that it happened? For example, you've been distracted for a second. Did you notice that *"the"* is doubled in the first sentence of this description?

As as aS you can see, it's not easy to spot those errors, especially if words differ in case, like *"as"* at the beginning of the sentence.

Write a function that counts the number of sections repeating the same word (case insensitive). The occurence of two or more equal words next after each other count as one.

**Example:**
```
"dog cat"                 --> 0
"dog DOG cat"             --> 1
"apple dog cat"           --> 0
"pineapple apple dog cat" --> 0
"apple     apple dog cat" --> 1
"apple dog apple dog cat" --> 0
"dog dog DOG dog dog dog" --> 1
"dog dog dog dog cat cat" --> 2
"cat cat dog dog cat cat" --> 3
```

Answer: {"fn_name": "count_adjacent_pairs", "inputs": [[""], ["orange Orange kiwi pineapple apple"], ["banana banana banana"], ["banana banana banana terracotta banana terracotta terracotta pie!"], ["pineapple apple"]], "outputs": [[0], [1], [1], [2], [0]]}
user: ## Task
 An `ATM` ran out of 10 dollar bills and only has `100, 50 and 20` dollar bills.
 
 Given an amount between `40 and 10000 dollars (inclusive)` and assuming that the ATM wants to use as few bills as possible, determinate the minimal number of 100, 50 and 20 dollar bills the ATM needs to dispense (in that order).

## Example

 For `n = 250`, the result should be `[2, 1, 0]`.
 
 For `n = 260`, the result should be `[2, 0, 3]`.
 
 For `n = 370`, the result should be `[3, 1, 1]`.

## Input/Output

 - `[input]` integer `n`
  Amount of money to withdraw. Assume that `n` is always exchangeable with `[100, 50, 20]` bills.
 - `[output]` integer array
  An array of number of `100, 50 and 20` dollar bills needed to complete the withdraw (in that order).

Answer: {"fn_name": "withdraw", "inputs": [[40], [250], [260], [230], [60]], "outputs": [[[0, 0, 2]], [[2, 1, 0]], [[2, 0, 3]], [[1, 1, 4]], [[0, 0, 3]]]}
user: Taking into consideration the [3.5 edition rules](http://www.dandwiki.com/wiki/SRD:Ability_Scores#Table:_Ability_Modifiers_and_Bonus_Spells), your goal is to build a function that takes an ability score (worry not about validation: it is always going to be a non negative integer), will return:

* attribute modifier, as indicated on the table of the above link;
* maximum spell level for the spells you can cast (-1 for no spells at all) with that score;
* the eventual extra spells you might get (as an array/list, with elements representing extra spells for 1st, 2nd,... spell level in order; empty array for no extra spells).

The result needs to be an object (associative array in PHP), as shown in the examples:

```python
char_attribute(0) == {"modifier": 0, "maximum_spell_level": -1, "extra_spells": []}
char_attribute(1) == {"modifier": -5, "maximum_spell_level": -1, "extra_spells": []}
char_attribute(5) == {"modifier": -3, "maximum_spell_level": -1, "extra_spells": []}
char_attribute(10) == {"modifier": 0, "maximum_spell_level": 0, "extra_spells": []}
char_attribute(20) == {"modifier": +5, "maximum_spell_level": 9, "extra_spells": [2,1,1,1,1]}
```

*Note: I didn't explain things in detail and just pointed out to the table on purpose, as my goal is also to train the pattern recognition skills of whoever is going to take this challenges, so do not complain about a summary description. Thanks :)*

In the same series:

* [D&D Character generator #1: attribute modifiers and spells](https://www.codewars.com/kata/d-and-d-character-generator-number-1-attribute-modifiers-and-spells/)
* [D&D Character generator #2: psion power points](https://www.codewars.com/kata/d-and-d-character-generator-number-2-psion-power-points/)
* [D&D Character generator #3: carrying capacity](https://www.codewars.com/kata/d-and-d-character-generator-number-3-carrying-capacity/)

Answer: {"fn_name": "char_attribute", "inputs": [[0], [1], [5], [10], [20]], "outputs": [[{"modifier": 0, "maximum_spell_level": -1, "extra_spells": []}], [{"modifier": -5, "maximum_spell_level": -1, "extra_spells": []}], [{"modifier": -3, "maximum_spell_level": -1, "extra_spells": []}], [{"modifier": 0, "maximum_spell_level": 0, "extra_spells": []}], [{"modifier": 5, "maximum_spell_level": 9, "extra_spells": [2, 1, 1, 1, 1]}]]}
user: Construct a function 'coordinates', that will return the distance between two points on a cartesian plane, given the x and y coordinates of each point.

There are two parameters in the function, ```p1``` and ```p2```. ```p1``` is a list ```[x1,y1]``` where ```x1``` and ```y1``` are the x and y coordinates of the first point. ```p2``` is a list ```[x2,y2]``` where ```x2``` and ```y2``` are the x and y coordinates of the second point. 

The distance between the two points should be rounded to the `precision` decimal if provided, otherwise to the nearest integer.

Answer: {"fn_name": "coordinates", "inputs": [[[3, 6], [14, 6]], [[-2, 5], [-2, -10], 2], [[1, 2], [4, 6]], [[5, 3], [10, 15], 2], [[-2, -10], [6, 5]], [[4, 7], [6, 2], 3], [[-4, -5], [-5, -4], 1], [[3, 8], [3, 8]], [[-3, 8], [3, 8]], [[3, 8], [3, -8]]], "outputs": [[11], [15], [5], [13], [17], [5.385], [1.4], [0], [6], [16]]}
user: You're about to go on a trip around the world! On this trip you're bringing your trusted backpack, that anything fits into. The bad news is that the airline has informed you, that your luggage cannot exceed a certain amount of weight.

To make sure you're bringing your most valuable items on this journey you've decided to give all your items a score that represents how valuable this item is to you. It's your job to pack you bag so that you get the most value out of the items that you decide to bring.

Your input will consist of two arrays, one for the scores and one for the weights. You input will always be valid lists of equal length, so you don't have to worry about verifying your input.

You'll also be given a maximum weight. This is the weight that your backpack cannot exceed.

For instance, given these inputs:

    scores = [15, 10, 9, 5]
    weights = [1, 5, 3, 4]
    capacity = 8
    
The maximum score will be ``29``. This number comes from bringing items ``1, 3 and 4``.

Note: Your solution will have to be efficient as the running time of your algorithm will be put to a test.

Answer: {"fn_name": "pack_bagpack", "inputs": [[[15, 10, 9, 5], [1, 5, 3, 4], 8], [[20, 5, 10, 40, 15, 25], [1, 2, 3, 8, 7, 4], 10], [[19, 8, 6, 20, 3, 16], [8, 2, 3, 10, 1, 5], 17], [[100, 5, 16, 18, 50], [25, 1, 3, 2, 15], 14]], "outputs": [[29], [60], [46], [39]]}
user: Write a program that prints a chessboard with N rows and M columns with the following rules:
The top left cell must be an asterisk (*)
Any cell touching (left, right, up or down) a cell with an asterisk must be a dot (.)
Any cell touching (left, right, up or down) a cell with a dot must be an asterisk.

A chessboard of 8 rows and 8 columns printed using these rules would be:
```
*.*.*.*.
.*.*.*.*
*.*.*.*.
.*.*.*.*
*.*.*.*.
.*.*.*.*
*.*.*.*.
.*.*.*.*
```
Input

A single line with two integers N and M separated by space. The number N will represent the number of rows and M the number of columns.

Output

Return N lines each containing M characters with the chessboard pattern.
Empty string if N, M or both are 0.


From: 2016 AIPO National Finals
http://aipo.computing.dcu.ie/2016-aipo-national-finals-problems

Answer: {"fn_name": "chessboard", "inputs": [["0 0"], ["1 0"], ["0 1"], ["2 2"], ["3 3"], ["5 2"], ["8 8"]], "outputs": [[""], [""], [""], ["*.\n.*"], ["*.*\n.*.\n*.*"], ["*.\n.*\n*.\n.*\n*."], ["*.*.*.*.\n.*.*.*.*\n*.*.*.*.\n.*.*.*.*\n*.*.*.*.\n.*.*.*.*\n*.*.*.*.\n.*.*.*.*"]]}
user: DNA is a biomolecule that carries genetic information. It is composed of four different building blocks, called nucleotides: adenine (A), thymine (T), cytosine (C) and guanine (G). Two DNA strands join to form a double helix, whereby the nucleotides of one strand bond to the nucleotides of the other strand at the corresponding positions. The bonding is only possible if the nucleotides are complementary: A always pairs with T, and C always pairs with G.

Due to the asymmetry of the DNA, every DNA strand has a direction associated with it. The two strands of the double helix run in opposite directions to each other, which we refer to as the 'up-down' and the 'down-up' directions.

Write a function `checkDNA` that takes in two DNA sequences as strings, and checks if they are fit to form a fully complementary DNA double helix. The function should return a Boolean `true` if they are complementary, and `false` if there is a sequence mismatch (Example 1 below).

Note:

- All sequences will be of non-zero length, and consisting only of `A`, `T`, `C` and `G` characters.
- All sequences **will be given in the up-down direction**.
- The two sequences to be compared can be of different length. If this is the case and one strand is entirely bonded by the other, and there is no sequence mismatch between the two (Example 2 below), your function should still return `true`.
- If both strands are only partially bonded (Example 3 below), the function should return `false`.

Example 1:

Example 2:

Example 3:

---
#### If you enjoyed this kata, check out also my other DNA kata: [**Longest Repeated DNA Motif**](http://www.codewars.com/kata/longest-repeated-dna-motif)

Answer: {"fn_name": "check_DNA", "inputs": [["GTCTTAGTGTAGCTATGCATGC", "GCATGCATAGCTACACTACGAC"], ["ATGCTACG", "CGTAGCAT"], ["AGTCTGTATGCATCGTACCC", "GGGTACGATGCATACAGACT"], ["TGCTACGTACGATCGACGATCCACGAC", "GTCGTGGATCGTCGATCGTACGTAGCA"], ["ATGCCTACGGCCATATATATTTAG", "CTAAATATGTATGGCCGTAGGCAT"], ["GTCACCGA", "TCGGCTGAC"], ["TAATACCCGACTAATTCCCC", "GGGGAATTTCGGGTATTA"], ["GCTAACTCGAAGCTATACGTTA", "TAACGTATAGCTTCGAGGTTAGC"], ["GCGCTGCTAGCTGATCGA", "ACGTACGATCGATCAGCTAGCAGCGCTAC"], ["GCTAGCACCCATTAGGAGATAC", "CTCCTAATGGGTG"], ["TAGCATCGCCAAATTATGCGTCAGTCTGCCCG", "GGGCA"], ["ACGACTACGTGCGCCGCTAATATT", "GCACGGGTCGT"], ["CGATACGAACCCATAATCG", "CTACACCGGCCGATTATGG"], ["CGACATCGAGGGGGCTCAGAAGTACTGA", "CATGGCGTCAGTACTTCTGAGCC"], ["GAGCAGTTGGTAGTTT", "GTATCGAAACTACCA"], ["TACGATCCAAGGCTACTCAGAG", "GGGATACTCTGAGTAGCCTTGGAA"], ["ATGCTACG", "CGTAGCAA"]], "outputs": [[false], [true], [true], [true], [false], [false], [false], [false], [true], [true], [true], [false], [false], [false], [false], [false], [false]]}
user: You are provided with array of positive non-zero ints and int n representing n-th power (n >= 2).

For the given array, calculate the sum of each value to the n-th power. Then subtract the sum of the original array.

Example 1: Input: {1, 2, 3}, 3 --> (1 ^ 3 + 2 ^ 3 + 3 ^ 3 ) - (1 + 2 + 3) --> 36 - 6 --> Output: 30

Example 2: Input: {1, 2}, 5  --> (1 ^ 5 + 2 ^ 5) - (1 + 2) --> 33 - 3 --> Output: 30

Answer: {"fn_name": "modified_sum", "inputs": [[[1, 2, 3], 3], [[1, 2], 5], [[3, 5, 7], 2], [[1, 2, 3, 4, 5], 3], [[2, 7, 13, 17], 2], [[2, 5, 8], 3], [[2, 4, 6, 8], 6], [[5, 10, 15], 4], [[3, 6, 9, 12], 3]], "outputs": [[30], [30], [68], [210], [472], [630], [312940], [61220], [2670]]}
user: You just took a contract with the Jedi council. They need you to write a function, `greet_jedi()`, which takes two arguments (a first name and a last name), works out the corresponding *Jedi name*, and returns a string greeting the Jedi.

A person's *Jedi name* is the first three letters of their last name followed by the first two letters of their first name. For example:
```python
>>> greet_jedi('Beyonce', 'Knowles')
'Greetings, master KnoBe'
```
Note the capitalization: the first letter of each name is capitalized. Your input may or may not be capitalized. Your function should handle it and return the Jedi name in the correct case no matter what case the input is in:
```python
>>> greet_jedi('grae', 'drake')
'Greetings, master DraGr'
```
You can trust that your input names will always be at least three characters long.

If you're stuck, check out the [python.org tutorial](https://docs.python.org/3/tutorial/introduction.html#strings) section on strings and search "slice".

Answer: {"fn_name": "greet_jedi", "inputs": [["Beyonce", "Knowles"], ["Chris", "Angelico"], ["grae", "drake"]], "outputs": [["Greetings, master KnoBe"], ["Greetings, master AngCh"], ["Greetings, master DraGr"]]}