Polynomials

Sort by

recency

|

245 Discussions

|

  • + 0 comments

    import numpy P=list(map(float,input().strip().split())) x=int(input())

    print(numpy.polyval(P,x))

  • [deleted]Challenge Author
    + 0 comments

    For Python3

    import numpy as np
    
    P = list(map(float, input().split()))
    x = float(input())
    
    print(np.polyval(P, x))
    
  • + 0 comments

    code

    import numpy print(numpy.polyval(list(map(float,input().split())),int(input())))

  • + 0 comments

    import numpy as np arr = np.array(list(map(float, input().split()))) x = int(input()) print(np.polyval(arr, x))

  • + 0 comments

    import numpy as np A = np.array(list(map(float,input().split()))) B=int(input()) print(np.polyval(A, B))