I wrote some code for a program that gives me the values of a sequence I defined as a function, f(x), but when I run it a error pops saying 'int' object is not callable". Does anyone know how to solve the problem?
def f(x):
if x%2==0:
return x/2
else:
return 3*x+1
limite=int(input("parar en: "))
x=int(input("a1: "))
print(x)
n=1
while n<=limite:
f=f(x)
print(f)
n=n+1
print("fin")