We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 337c658 commit 4de7ee2Copy full SHA for 4de7ee2
newcodes/answers/q62.py
@@ -0,0 +1,15 @@
1
+#!/usr/bin/env python
2
+# coding=utf-8
3
+
4
+class PayCalculator:
5
+ def __init__(self, pay_rate):
6
+ self.pay_rate = pay_rate
7
8
+ def compute_pay(self, hours):
9
+ total_pay = self.pay_rate * hours
10
+ return round(total_pay, 2)
11
12
+if __name__ == "__main__":
13
+ worker = PayCalculator(25.7)
14
+ total = worker.compute_pay(8)
15
+ print(total)
0 commit comments