prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Code provided for students contain python code not compatible with python 3
  At least one file in the `code` directory, e.g., `gen_inflammation.py` fails when running it with python 3. The [problem is the "division" not giving an integer](https://github.com/swcarpentry/python-novice-inflammation/blob/11643f14d31726f2f60873c4ca1230fff0bbf108/code/gen_inflammation.py#L19). It needs to be changed to
  ```diff
  - upper / 4
  + upper // 4
  ```
  
  This was spotted by a student trying to check their installation and running different files.
  Other files may have similar errors. I'd suggest running and testing via CI everything we provide to the students.
  
  
  </issue>
  <code>
  [start of code/gen_inflammation.py]
  1 #!/usr/bin/env python
  2 
  3 """
  4 Generate pseudo-random patient inflammation data for use in Python lessons.
  5 """
  6 
  7 import random
  8 
  9 n_patients = 60
  10 n_days = 40
  11 n_range = 20
  12 
  13 middle = n_days / 2
  14 
  15 for p in range(n_patients):
  16     vals = []
  17     for d in range(n_days):
  18         upper = max(n_range - abs(d - middle), 0)
  19         vals.append(random.randint(upper/4, upper))
  20     print(','.join([str(v) for v in vals]))
  21
  [end of code/gen_inflammation.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/code/gen_inflammation.py b/code/gen_inflammation.py
  --- a/code/gen_inflammation.py
  +++ b/code/gen_inflammation.py
  @@ -16,5 +16,5 @@
       vals = []
       for d in range(n_days):
           upper = max(n_range - abs(d - middle), 0)
  -        vals.append(random.randint(upper/4, upper))
  +        vals.append(random.randint(upper//4, upper))
       print(','.join([str(v) for v in vals]))
  
verification_info: {"golden_diff": "diff --git a/code/gen_inflammation.py b/code/gen_inflammation.py\n--- a/code/gen_inflammation.py\n+++ b/code/gen_inflammation.py\n@@ -16,5 +16,5 @@\n     vals = []\n     for d in range(n_days):\n         upper = max(n_range - abs(d - middle), 0)\n-        vals.append(random.randint(upper/4, upper))\n+        vals.append(random.randint(upper//4, upper))\n     print(','.join([str(v) for v in vals]))\n", "issue": "Code provided for students contain python code not compatible with python 3\nAt least one file in the `code` directory, e.g., `gen_inflammation.py` fails when running it with python 3. The [problem is the \"division\" not giving an integer](https://github.com/swcarpentry/python-novice-inflammation/blob/11643f14d31726f2f60873c4ca1230fff0bbf108/code/gen_inflammation.py#L19). It needs to be changed to\r\n```diff\r\n- upper / 4\r\n+ upper // 4\r\n```\r\n\r\nThis was spotted by a student trying to check their installation and running different files.\r\nOther files may have similar errors. I'd suggest running and testing via CI everything we provide to the students.\r\n\n", "before_files": [{"content": "#!/usr/bin/env python\n\n\"\"\"\nGenerate pseudo-random patient inflammation data for use in Python lessons.\n\"\"\"\n\nimport random\n\nn_patients = 60\nn_days = 40\nn_range = 20\n\nmiddle = n_days / 2\n\nfor p in range(n_patients):\n    vals = []\n    for d in range(n_days):\n        upper = max(n_range - abs(d - middle), 0)\n        vals.append(random.randint(upper/4, upper))\n    print(','.join([str(v) for v in vals]))\n", "path": "code/gen_inflammation.py"}]}