So it looks like youre having issues understanding how to invoke the function.
Look at this code, see how i assign this to be equal to circle(77)? That is one way of invoking the function. Note that your functions can be in seperate files where you can import them from. If theyre in the same file, theyll need to be above any code referencing them.
def circle(radius):
pi = 3.141592
a = 2 * radius * pi
c = 2 * pi * radius
print (f'Area is '+str(a)+' and the circumference is '+str(c))
#this line invokes the function
this = circle(77)
1
solved Not sure why this function does not work? [closed]