GhPython uses the standard Grasshopper input variables names for inputs. Your code actually works, but quite confusingly, the input is requested on the only command line interface that is available in Rhino: the Rhino command line (not in Grasshopper). Have a look there…
The best idea is just to use the provided variables. Please read about them on the Python Guides page, especially the “Python in Grasshopper” part.
PS: Two minor requests for future questions: 1. Please ask new questions in new threads - do not revive old threads. Do not worry and be brave: you are fully entitled to start a new topic; 2. If you reference a definition, please always attach it. Be so kind and do not expect willing assistants to re-create it from a picture.