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

多部门的打工人

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):

        print("%s's ID is %s, and his or her number of signing in is %s."%(self.name,self.ID,self.num))

class IT(Nowcoder):

    def __init__(self, name, ID, num,language):

        super(IT,self).__init__(name, ID, num)

        self.language=language

class Designer(Nowcoder):

    def __init__(self, name, ID, num,color):

        super(Designer,self).__init__(name, ID, num)

        self.color=color

a,b,c,d=input().split()

it = IT(a,b,c,d)

it.printInformation()

print(it.language)

a,b,c,d=input().split()

de = Designer(a,b,c,d)

de.printInformation()

print(de.color)

全部评论

相关推荐

06-26 10:08
门头沟学院 C++
北京Golang实习,一个月4700,吃住都不报,公司位置在海淀。请问友友怎么看呢?如果要租房的话有什么建议吗
码农索隆:租房肯定是合租了,剩下的钱,差不多够正常吃饭了,看看能不能学到东西吧
点赞 评论 收藏
分享
05-12 17:00
门头沟学院 Java
king122:你的项目描述至少要分点呀,要实习的话,你的描述可以使用什么技术,实现了什么难点,达成了哪些数字指标,这个数字指标尽量是真实的,这样面试应该会多很多,就这样自己包装一下,包装不好可以找我,我有几个大厂最近做过的实习项目也可以包装一下
点赞 评论 收藏
分享
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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