<problem>
Write a method `split(cookies:int, people:int) -> Tuple[int,int, str]` that takes in a number of cookies and a number of people. The function should find if the cookies can be split evenly amongst all people. If so, return a `Tuple` containing how many cookies each person will get and the number of leftover cookies, which is `0` and a string saying "Cookies can be split evenly!". If the cookies cannot be split evenly, then calculate the minimum number of cookies that need to be purchased to split the cookies evenly. The function should return the total number of cookies after the purchase, how many cookies each person will get then, and a string saying "Cookies cannot be split evenly. Bought more cookies." Assume that `people` and `cookies` are positive integers.

## Example Cases:
```
split(10, 2) => (5, 0, "Cookies can be split evenly!")
split(10, 3) => (12, 4, "Cookies cannot be split evenly. Bought more cookies.")
split(20, 4) => (5, 0, "Cookies can be split evenly!")
split(10, 5) => (2, 0, "Cookies can be split evenly!")
split(25, 10) => (30, 3, "Cookies cannot be split evenly. Bought more cookies.")
```
</problem>
<bug_code>
1. def split (cookies, people):
2.  if cookies % people == 0:
3.    return (cookies // people, 0, "Cookies can be split evenly!")
4.  else:
5.    newCookies = cookies - (cookies % people)
6.    return (newCookies, newCookies // people, "Cookies cannot be split evenly. Bought more cookies.")
</bug_code>
<bug_desc>
On line 5, `newCookies` computes the maximum subset of cookies that can be split evenly among the people, which are less than the given number of cookies. However, the problem description asks for more cookies to be purchased, so the total number of cookies that is returned should be larger than the given number of cookies.
</bug_desc>
<bug_fixes>
Replace line 5 with `purchasedCookies = people - cookies % people` an then insert a line after that containing `newCookies = cookies + purchasedCookies`.
Replace `cookies - (cookies % people)` with `people - cookies % people + cookies` on line 5.
Remove line 5. Add then insert the following lines in its place`leftOverCookies = cookies % people` and  `newCookies = people - leftOverCookies + cookies`.
</bug_fixes>
<unit_tests>
assert split(10, 2) == (5, 0, "Cookies can be split evenly!")
assert split(10, 3) == (12, 4, "Cookies cannot be split evenly. Bought more cookies.")
assert split(20, 4) == (5, 0, "Cookies can be split evenly!")
assert split(10, 5) == (2, 0, "Cookies can be split evenly!")
assert split(25, 10) == (30, 3, "Cookies cannot be split evenly. Bought more cookies.")
</unit_tests>
<stu_desc>

</stu_desc>
<dialogue>
User: Hello I need help with my code, it is not giving me the output I expect.
Assistant: Let's look into what's going on. What happens when you try to run the sample test cases `split(10, 2)` and `split(10, 3)`?
	<alt>Let's walk through your code. What is the output if your input is `(10, 2)` and `(10,3)`?
	<alt>Sure, have you tried the test cases as inputs? What have you observed about the output?
	<alt>Here to help! Let's track the values of the variables in your code as we step through it. How do they change when the input is `(10, 2)` vs when the input is `(10, 3)`?
	<alt>Let's look at what happens when we go line by line. Can you tell me the values of `newCookies` for the different test inputs?
	<alt>Let's look at one of the test examples. If we can only assign whole cookies to each person, then in which case would we need to buy more cookies?
User: I get the wrong answer for any case where the `cookies` are more or less than multiples of the `people`.
	<alt>My code gives the wrong output for inputs where the `cookies` are not divisible by the `people`.
	<alt>For `split(10, 2)`, I get the correct answer which is `(5, 0, "Cookies can be split evenly!")`. But with `split(10, 3)`, I get `(9, 3, 'Cookies cannot be split evenly. Bought more cookies.')` which is not the correct answer. It seems like the answer is only correct when the number of `cookies` is divisible by the number of `people`.
	<alt>I need `cookies` to be a multiple of the `people` to get the right answer.
Assistant: That's right. According to the problem statement, we can buy more cookies, but not reduce the cookies we have. In which line of your code might this requirement be violated?
	<alt>Let's also keep in mind that we can buy more cookies, but not waste any that we already have in the process of ensuring everyone gets the same amount, as mentioned in the problem statement. Where can we account for this in your code?
User: That makes sense. I think I need to modify line 5, and account for the requirement that I can buy more cookies but not vice versa. I will update line 5.
<code>
1. def split (cookies, people):
2.  if cookies % people == 0:
3.    return (cookies // people, 0, "Cookies can be split evenly!")
4.  else:
5.    purchasedCookies = people - cookies % people
6.    newCookies = cookies + purchasedCookies
7.    return (newCookies, newCookies // people, "Cookies cannot be split evenly. Bought more cookies.")
</code>
Assistant: Sounds good, see you later!
</dialogue>