A puzzle game where the answer is to press a keyboard button, but there's a puzzle that solves nothing.

How about something simple. Create a program which solves for all the zeros of a quadratic polynomial given the coeffecients. If you want a WAY harder challenge, try writing one for an n-degree polynomial.

    Captain_Jack_Sparrow Try something like this:

    print("enter the coeffecients of a polynomial of the form ax^2 + bx + c")
    a = float(input("coeffecient a: "))
    b = float(input("coeffecient b: "))
    c = float(input("coeffecient c: "))
    # Do math
    # Print zeros of the polynomial

    Here is an example:
    2x2+16x+30
    in this case, you can find the zeros by doing the following:
    2x2-16x+30 = 0
    2(x2-8x+15) = 0
    2(x-5)(x-3) = 0
    x-5 = 0
    x = 5
    x-3 = 0
    x = 3

    Therefore, if I input 2, 16, 30 as a, b, c respectively into your program it should print 5 & 3

      22 days later
      9 days later

      Chat