题解 | #多部门的打工人#

多部门的打工人

https://www.nowcoder.com/practice/e704f2c5c30c4aa0b1de9e71bc584fb3

class Nowcoder:
    def __init__(self,name,ID,num):
        self.name = name
        self.ID = ID
        self.num = num
    def printInformation(self):
        # pass
        print(f"{self.name}'s ID is {self.ID}, and his or her number of signing in is {self.num}.")

class IT(Nowcoder):
    def __init__(self, name, ID, num, language):
        super().__init__(name, ID, num)
        self.language = language

class Designer(Nowcoder):
    def __init__(self, name, ID, num, color):
        super().__init__(name, ID, num)
        self.color = color

str1=input()
str2=input()
args1=tuple(str1.split())
args2=tuple(str2.split())
emp1=IT(*args1)
emp1.printInformation()
print(emp1.language)
emp2=Designer(*args2)
emp2.printInformation()
print(emp2.color)


全部评论

相关推荐

Gaynes:查看图片
点赞 评论 收藏
分享
zzzzhz:兄弟你先猛猛投简历至少三百家,能约到面试就去面。最近可以速成智能小车,智慧家居烂大街的项目,不需要自己写,只需要把里面的代码讲解看明白就行。把其中涉及到的八股文都拿出来单独背一下,我去年找工作就一个智能小车智慧家居找了10k差不多。
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务