Please Login in order to post a comment
f = input() f_r = f.replace("x" , str(x)) print(eval(f_r) == y)
x, k = map(int,input().split(" ")) print(eval(input()) == k)
---- Using Pypy 3 ---- x, k = map(int, input().split()) expression = input() print(eval(expression) == k)
x, k=map(int, input().split()) p=input() print(eval(p)==k)
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)
Seems like cookies are disabled on this browser, please enable them to open this website
x, k=map(int, input().split()) p=input() print(eval(p)==k)
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)