You want to take another look at the error message as you would not get to the input statement. The program will stop at "def main()" and "def getfibnum()" Also, take a look at this statement
firstnum = 1 = language
firstnum can either equal 1 or language, but not both.
Finally, the statement "fibnum = getfibnum()" will always result in fibnum = None
Look at post #3 here (and beyond) for the way to program a function http://www.daniweb.com/forums/thread20774.html