Sort by

recency

|

552 Discussions

|

  • + 0 comments
    f = input()
    
    f_r = f.replace("x" , str(x))
    
    print(eval(f_r) == y) 
    
  • + 0 comments
    x, k = map(int,input().split(" "))
    print(eval(input()) == k)
    
  • + 0 comments
    ---- Using Pypy 3 ----
    
    x, k = map(int, input().split()) 
    expression = input() 
    print(eval(expression) == k)
    
  • + 0 comments

    x, k=map(int, input().split()) p=input() print(eval(p)==k)

  • + 0 comments

    x_and_k = input() x = x_and_k[0] k = x_and_k[1::] x = int(x) k = int(k) p = input()

    x = str(x)

    polynomial = p.replace("x",x) polynomial = polynomial.strip().lower()

    answer = eval(polynomial) if answer == k: print(True) else: print(False)