Global variables persist after function calls have completed, so we have to be very careful about modifying globals in functions. Your code relies on x being 1 when the function is called, but after factorialize has been executed it is no longer 1. This means that your function will only work once.
Thanks for that response. I knew when I was writing it it wasn’t the best solve. My first few attempts at the solve were very close to what I now see was my first try. I looked at the spoiler and just see that I was off on the condition statement in my for loop. Thanks again.