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 ?
You need to cast the default string type to int
val = raw_input() #val accepts a string
val = int(raw_input()) #val takes integer input