0

Need a class consisting on 2methods

payroll with classes method1 accept parameters bonus rate and hours gross =hours*rates method2 gross*bonus user must input hours and rate can someone help me i got class payrate: def calc_gross(self,hours,rate,bonus,gross) bonus = 100 if hours <= 40 else 50 gross= hours*rate return gross def gross_sum_bonus(self,gross,bonus): return gross + bonus now print Dunno how to print and need help fixing syntax

22nd Apr 2018, 12:16 PM
Cyberfire Gaming
Cyberfire Gaming - avatar
4 ответов
+ 1
thx
22nd Apr 2018, 1:58 PM
Cyberfire Gaming
Cyberfire Gaming - avatar
+ 1
Cyberfire Gaming I updated it again. Before you had redundant member function arguments.
22nd Apr 2018, 2:31 PM
Emma
+ 1
oh thanks
22nd Apr 2018, 2:41 PM
Cyberfire Gaming
Cyberfire Gaming - avatar