CUNY-City University of New York: Math 308 problem solving using Python (Fall 2015)
Three assignments are solved using python. Each Assignment Folder has a PDF describing the problem and a python solution file.
All the problems are in the form of a function which can be run through terminal/cmd. First navigate to the appropiate folder where the file with .py extension is, then run
$python
Which will open the python shell. Once in the shell, import the function then pass in values(if necessary) to get the correct output. For example: From assginment_1 to check if a number is_prime(x) which takes a parameter and returns True or False use:
>>> from pa1 import is_prime
>>> is_prime(7)
True
>>> is_prime(9)
Flase
Follow the same direction to use other functions.