0
Python
Please is there a way I can automate this in python? Let's say I have something like this : b = sqrt(b2 - 4a) / 2a If there's a way I can represent this in dictionary like this : (b, {sqrt:{div:{sub:{pow:{b, 2},mul:{4,a}}}},mul:{4,a}}) If there's a way to loop through the equation and get it in this dictionary format
3 ответов
+ 1
#Yeah Why not
px = input()
#equation in format ax²+bx+c
a,b,c = px.split("+")
#spliting at every +
a,b,c = map(int,(a[:-1],b[:-1],c))
#converting numbers to int
values = {}
values["b"] = pow(b**2 - 4*a*c,0.5)/2*a
print(values)
#Hope It Helps You 😊
0
What if I just want to simplify the alphabet like without using integers
0
Abdullah Sorry ,I didn't get you
Can you explain what you are talking to do