Problem :
This challenge is only forPython 2.
input()
in Python 2, the expression input() is equivalent to eval(raw _input(prompt)).
code :
>>> input() 1+2 3 >>> company = 'HackerRank' >>> website = 'www.hackerrank.com' >>> input() 'The company name: '+company+' and website: '+website 'The company name: HackerRank and website: www.hackerrank.com'
Task :
You are also given the values of x and k. Your task is to verify if P(x) == k.
Constraints :
x and y are also integers.
Input Format :
The second line contains the polynomial P.
Output Format :
Print True if P(x)==k. Otherwise, print False.
Sample Input :
1 4 x**3 + x**2 + x + 1
Sample Output :
True
Explanation :
P(1) = 1^3 + 1^2 + 1 + 1 = 4 = k
Hence, the output is True.