Hello....please I'm trying to do the problem set 2 in the Introduction to computing course using python.....i've download the zip files for that particular assignment....but I'm having a problem loading it into python so I can call the function evaluate_poly
Can anyone help out? ....please
You did unzip the files to get to the Python files, right? Are the Python files in the same folder that you're launching Python from?
Ok.....i unzipped the files and copied it into my local disk(C) where I have python located......isn't it supposed to work when I launch the python?
Usually when I want to launch python I just search for it on the start menu and click the one that says IDLE.....then the python shell pops up
Okay, first you have to import the functions. The reason for putting the file in the same folder that you launch Python from is to make the import statement easy: from <fileName> import * fileName is the name of the file WITHOUT the .py extension. Using the import statement this way will import the contents of fileName.py into the current namespace. Then you can use the classes/functions with a normal call: evaluate_poly() #add whatever arguments are needed
Join our real-time social learning platform and learn together with your friends!