my code for factorial
import math def factorial(x): user = int(raw_input("Please enter a number: ")) if(user == 1): return 1 else: return user * len(user-1) print user
Oops, try again. factorial(1) resulted in an error: invalid literal for int() with base 10: ''
I tried something different. Multiplying the no. entered by user into len(user - 1)
can u let me know where m wrong!