educoder-头歌 定义银行员工类BankEmployee

class BankEmployee():
 #        请在此处添加代码         #
 # *************begin************#
    def __init__(self,name,num):
        self.__name__ = name
        self.__num__ = num
        self.__salary__ = 3000

    def get_salary(self):
        s = self.__name__ + "领到这个月工资" + str(self.__salary__)
        print(s)
 # **************end*************#

def main():
    name = input()
    num = input()
    bankemployee = BankEmployee(name,num)
    bankemployee.get_salary()

if __name__=="__main__":
    main()

你可能感兴趣的:(python)