For the R function shown below(Attachment):
What is returned from the function, in terms of j?

Answer:
The given function will return an integer in term of j on each iteration of while loop. However, it is noted that this program has some syntax error. The complete code executed in an online R compiler with explanation is given below
Explanation:
def<-function(j){
k=0;
i=1;
while (i<j**3) #j raise to power 3
{
k<-k+1;#k=k+1
i <- i*2;#i=i*2
print(k);#
}
}
def(6)# if you pass the value 6 to function def(j)