亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

下面這個python程序哪里有問題阿總報錯

下面這個python程序哪里有問題阿總報錯

肥皂起泡泡 2018-07-16 10:09:55
1 #!/usr/sbin/env python                                                        2 #from new import *   3   4 class worker:  5     def __int__(self, name, pay):  6         self.name = name  7         self.pay = pay  8     def lastname(self):  9         return self.name.split()[-1] 10     def giveRaise(self, percent): 11         self.pay *=(1.0 + percent) 12 bob = worker('Bob Smith',50000) 13 sue = worker('sue leaf',50000) 14 bob.lastname() 15 sue.lastname() 16 sue.giveRaise(.10) 17 sue.pay[root@server1 ~]# python old.py Traceback (most recent call last):  File "old.py", line 18, in <module>    bob = worker('Bob Smith',50000)TypeError: this constructor takes no arguments
查看完整描述

1 回答

  • 1 回答
  • 0 關注
  • 160 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號