variable inside def function

do we have ti declare all the variable inside a def
as global?

i put a small procedure inside a def to make a triangle with verts and faces
but it’s not recognising the verts and all the variable seems to be a zero?
if anybbody can help i’d appreciate it a lot

it is possible that this is during the first evalutation of the script
some of the print are not done!

her is where it bugs down


def make_spiral_Rectangle():
 
##################################################
# Make rectangle triangle with base and height
print " hey i'm in triangle rectangular"
print " hypo =",glob.hypo
 
####### its buggging down at this line i think!
 
glob.hypo= sqrt(pow( glob.base, 2)+pow( glob.height, 2))
glob.peri=glob.base+glob.height+glob.hypo
glob.sm=0.5*(glob.base+glob.height+glob.hypo)
glob.sa=glob.sm*(glob.sm-glob.base)*(glob.sm-glob.heig
 
 
 

\

at the first line glob.hypo it says that it need a float ?

Thanks