Explorar o código

coefficient of work exp based on education

JoostSijm %!s(int64=6) %!d(string=hai) anos
pai
achega
312143d76f
Modificáronse 1 ficheiros con 20 adicións e 0 borrados
  1. 20 0
      education.py

+ 20 - 0
education.py

@@ -0,0 +1,20 @@
+"""Calculate resources koef"""
+
+def calc_koef(education_level):
+    """Calculate koef based on education"""
+    max_work_exp = 80000 + 200 * education_level
+    return pow(max_work_exp / 10, 0.6)
+
+
+def calc_education_koef(old_education, new_education):
+    """Calculate resource koef for eductaion"""
+    old_koef = calc_koef(old_education)
+    new_koef = calc_koef(new_education)
+    percentage = 100 / old_koef * new_koef
+    print("%8.2f%8.2f%8.2f" % (old_koef, new_koef, percentage))
+
+
+if __name__ == "__main__":
+    print("old new percentage")
+    calc_education_koef(30, 286)
+    calc_education_koef(286, 350)