You should call your function, otherwise opp
will not get defined.
oppervlakte()
print opp
But a better way would to return opp
from the function and assign to a variable in global namespace.
def oppervlakte():
lengte = int(raw_input("Voer de lengte in: ")) #call int() here
br = int(raw_input("Voer de breedte in: ")) # call int() here
opp = lengte * br # Calculates the dimension of the floor
return opp, lengte, br
opp, lengte, br = oppervlakte()
And just calling int()
on a string will not make it an integer, you should assign the returned value to a variable.
>>> x = '123'
>>> int(x) #returns a new value, doesn't affects `x`
123
>>> x #x is still unchanged
'123'
>>> x = int(x) #re-assign the returned value from int() to `x`
>>> x
123