Created
July 8, 2020 07:42
-
-
Save Chestermozhao/014c352e97ba55a67b71b9335f32fde2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Investment(object): | |
| def __init__(self, us_dollar, fund, stock): | |
| self.us_dollar = us_dollar | |
| self.fund = fund | |
| self.stock = stock | |
| # convert unit: transfer us_dollar to RMB | |
| @staticmethod | |
| def convert_unit(us_dollar): | |
| print("converting us dollar to RMB") | |
| return us_dollar // 7 | |
| Investment.convert_unit(140) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment