Skip to content

rpural/Python_Examples

Repository files navigation

Python_Examples

Examples of Python code and library use:

  • coins.py - Given an amount, list the coins required to make the amount.
  • contextmgrsample.py - Implementation of a simple Context Manager in Python
  • number2text.py - This program reads a number from the user, and converts the number to its written text equivalent.
  • path.py - This program finds the shortest weighted path through a set of given nodes. path.json contains demonstration data.
  • roomsNeeded.py - Given the lengths of the class and their start times, how many classrooms are required to hold the sessions, taking into account the sessions that overlap.
  • spiral.py - Given a 2D list, print the values in a spiral from outside to center.
  • swaps.py - Given an integer, swap its even and odd bits throughout.
  • uniques.py - Given a list of values, return the values which only occur once.
  • webpage2json.py - This program reads a web page from the iSeries IBM site, uses BeautifulSoup to extract a table of updates, and saves the details about those updates in JSON to stdout.

About

Examples of Python code and library use

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages