I write a simple factorial function in python to know the factorial of n . As like we given n and it shows the factorial of n . But the problem is , i use raw_input function to get the value of n. But can't work with that . What can i do to do with raw_input ?
Your factorial function probably takes an integer as input.
However, raw_input returns a string.
So you either need to convert the returned string to an integer.
By using int().
Or you can directly use input() which returns an integer in Python2.
Input from keyboard in python