Skip to content

knishina/python_recursion

Repository files navigation

python_recursion

Summary.

This folder python_recursion, is an exploration of recursion using Python 3.6.7. There are seven exercises, one per Jupyter Notebook file. The format of each file is as follows: an iterative function, a recursive function, and tests to ensure both functions perform correctly.

Exercises.

There are seven exercises. Below, are the folders and a brief summary of each. Each file has an ipynb file, an executable .py file, and a test file (unit tests).

  • 01_SumOfList               Find the sum of a list.
  • 02_CounterOfList        Find the number of members in a list.
  • 03_MaxOfList               Find the maximum value of a list.
  • 04_MinOfList               Find the minimum value of a list.
  • 05_FibonacciSequence Find the ith number of a Fibonacci Sequence.
  • 06_Factorial               Find the factorial of a number.
  • 07_DoublingNumbers     Find the sum of doubled numbers in range of numbers.

To Run:

  • open a terminal/bash window. Pull the files to the desktop: git clone https://github.com/knishina/python_recursion.git
  • cd into the file you would like to explore.
  • type python <filename>.py to run.
  • type pytest to run the unit tests of the .py
            - if it does not run, type in pip install -U pytest

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

About

Exploration of recursive functions in python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published