首页 > 代码库 > Learn Python 016: Coin - a project of msc, unfinished.

Learn Python 016: Coin - a project of msc, unfinished.

import random

class Coin:

    def __init__(self, rare=False, clean=True, **kwargs):

        for key,value in kwargs.items():
            setattr(self,key,value)

        self.is_rare = rare
        self.is_clean = clean
        self.heads = heads

        if self.is_rare:
            self.value = http://www.mamicode.com/self.original_value * 1.25>

 

Learn Python 016: Coin - a project of msc, unfinished.