So i'm creating a little experimental python program and I'm using a little tidbit of code (shown below) to determine if a number is whole or has decimal places.
def isWhole(x):
if(x%1 == 0):
return "1"
else:
return "2"
My problem is that no matter where I go I can't find a way to just take the returned value and assign it to a variable...
Sorry if I seem like an absolute spurglord noob for asking this question but I never even knew that functions could "return" until about 2 days ago, so yeah...