I am a programming beginner and I was experimenting a bit with functions. I have two variables (integer) and a self-created function that adds 1 to the variable. I wanted to run the function in a while loop in which the function should keep adding 1 to the variables until one of them has reached a certain number, but it ends in an endless loop that only uses the functions once. What is my mistake?
aa = 2
bb = 5
def test(aa, bb):
aa = aa + 1
bb = bb + 1
return aa, bb
while aa < 6:
test(aa, bb)
print(aa, bb)