PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
"write function as f(x) = ax^2 + bx + c, where a,b,c,x are numbers"
g=str(input())
f=g.replace(" ","")
x=int(f[2])
a=int(f[5])
if f[9]=="+":
b=int(f[10])
else:
b=-int(f[10])
if f[12]=="+":
c=int(f[13])
else:
c=-int(f[13])
print(g+" = "+str(int(a)*int(x)**2+int(b)*int(x)+int(c)))
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run