Sort by

recency

|

554 Discussions

|

  • + 0 comments

    x, k = map(int,input().split(" ")) p = input() uppalbalu = eval(p) if uppalbalu == k: print('True') else: print('False')

  • + 0 comments
    #The eval() function in Python is used to evaluate a string as a Python expression. It parses the string and executes it as code within the current environment.
    #Using Pypy 3
    
    x,k = map(int, input().split())
    poly_exp = input() 
    print((eval(poly_exp))==k)    
    
  • + 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)