My code:
Sum=1
fact=0
n= int(input("enter your number"))
x= int(input("enter your number"))
for number in range (2,n+1,2):
fact=1
for j in range (1,number+1):
fact=fact*j
k= x**number
Sum+= k/fact
print(Sum)
Would this code work and is it efficient for the question "1+(x^2/2!)+(x^4/4!)+....+(x^n/n!)" where x and n are user inputted values