top | item 40821846

(no title)

sujumayas | 1 year ago

When I used it with ollama in the terminal (first try prompt: "create a snake game in HTML canvas", nothing else) it went forever rambling. It started with the right answer in HTML code, but then it started explaining, and started repeating itself, and then it started to put things like random code snippets and random explanations that were nonsense like:

```python def solve_quadratic_equation(a, b, c): """Solves a quadratic equation of the form ax^2 + bx + c = 0."""

  discriminant = (b ** 2) - (4 * a * a)
  if discriminant >= 0:
    root = (-b + math.sqrt(b ** 2 - 4 * a * a ** b**

  0.5 #
  1.

  # Return None if the quadratic equation has no real roots
  if (b ** 2) < (4 * c):
  return None

  # Calculate the roots using the quadratic formula
  b = -b
  b


  # a, b): Solve for the discriminant.

  # Handle the case of a complex discriminant
# Print the solution to the equation if (b * 2)

print("The quadratic equation is: " + a * x* 2 + b "x" + c) ```

discuss

order

sujumayas|1 year ago

Just realized that Gemma2 is pretty bad in programming tasks. Lol.