Skip to content

momentum-cohort-2019-02/w3d2--money

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Object-oriented money

Description

Using a set of provided class skeletons, create Currency and Money classes that pass all tests.

Objects

After completing this assignment, you should understand:

  • How classes define methods for their objects

After completing this assignment, you should be able to:

  • Create an instance method
  • Call instance methods

Details

Deliverables

  • A Git repo containing all the provided starter files completed to make this program work.

Requirements

  • Tests in money_test.py pass
  • No PEP8 or Pyflakes warnings or errors

Normal Mode

Read the classes Currency and Money as well as their tests. Using the docstrings included, complete these classes. Upon completion, the tests in money_test.py should pass.

Advanced Mode

Take a look at this guide to Python's magic methods. Write tests for using the standard mathematical operators (+, -, *, /) on Money and then implement the methods needed.

Another option

Go back to yesterday's assignment and re-read it. Then implement a CurrencyConverter class that takes a list of rates, and has a convert method to convert money. Write tests for this class.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages