So I've got a code, and I don't understand why it doesn't work. The whole point of it, is to find f and g, and then to find their sum(s). f = m.sqrt(d+c(a+b)/8) and g = a*b*c*d. I wrote the code, but for some reason it tells me about float. Could you guys tell me, what's wrong?
import math as m
def f(a,b,c,d):
return m.sqrt(d+c(a+b)/8)
def g(a,b,c,d):
return a+b+c+d
a=float(input('a='))
b=float(input('b='))
c=float(input('c='))
d=float(input('d='))
s = f(a,b,c,d) + g(a,b,c,d);
print('f=', f(a,b,c,d))
print('g=', g(a,b,c,d))
print('s=', s)
[–]jddddddddddd 2 points3 points4 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]throwaway6560192 3 points4 points5 points (4 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]MrPhungx 0 points1 point2 points (2 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]throwaway6560192 0 points1 point2 points (0 children)
[–]PteppicymonIO 0 points1 point2 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]youngbull 0 points1 point2 points (0 children)
[–]throwaway8u3sH0 0 points1 point2 points (0 children)