Skip to content

Instantly share code, notes, and snippets.

@Chestermozhao
Created July 8, 2020 07:42
Show Gist options
  • Save Chestermozhao/014c352e97ba55a67b71b9335f32fde2 to your computer and use it in GitHub Desktop.
Save Chestermozhao/014c352e97ba55a67b71b9335f32fde2 to your computer and use it in GitHub Desktop.
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