-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmorhun_hw3.py
88 lines (66 loc) · 3.02 KB
/
morhun_hw3.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# -*- coding: utf-8 -*-
"""Copy of TakeHomeExam#3
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1ZZLRPQXjre7VVfcWTKyOmmTlNLuNtMKd
"""
#Muhammed Orhun Gale
date = input("Today's date and your birth date: ")
a,b = date.split("-")
yold = int(a[-4:]) - int(b[-4:])
position = input("The position you are applying for: ")
date = ["11/11/2019","12/11/2019","13/11/2019"]
if position.lower() == "software developer":
python = input("Have you ever used Python in your projects?: ")
check = True
if python.lower() == "yes":
score = yold*0.4 + 40
elif python.lower() == "no":
score = yold*0.4 + 15
else:
check = False
if check == True:
if score > 70:
print("Your score is ", format(score,".2f"), " and your interview will be on ", date[0] , ".", sep="")
elif 40<score<=70:
print("Your score is ", format(score,".2f"), " and your interview will be on ", date[1] , ".", sep="")
elif score<=40:
print("Your score is ", format(score,".2f"), " and your interview will be on ", date[2] , ".", sep="")
elif check == False:
print("Error: Invalid answer for using Python.")
elif position.lower() == "faculty member":
exp = input("Experience, number of conference and journal papers (E-C-J): ")
E,C,J = exp.split("-")
score = int(E)*0.7 + int(C)*1.5 + int(J)*2.5 + yold*0.4
if score > 70:
print("Your score is ", format(score,".2f"), " and your interview will be on ", date[0] , ".", sep="")
elif 40<score<=70:
print("Your score is ", format(score,".2f"), " and your interview will be on ", date[1] , ".", sep="")
elif score <= 40:
print("Your score is ", format(score,".2f"), " and your interview will be on ", date[2] , ".", sep="")
elif position.lower() == "lawyer":
case = input("How many cases did you work on?: ")
check7 = case.isdigit()
if check7 == False:
print("Error: You did not enter an integer.")
elif check7 == True:
if int(case)<10:
score = yold*0.4 + int(case)*3
if score > 70:
print("Your score is ", format(score,".2f"), " and your interview will be on ", date[0] , ".", sep="")
elif 40<score<=70:
print("Your score is ", format(score,".2f"), " and your interview will be on ", date[1] , ".", sep="")
elif score <= 40:
print("Your score is ", format(score,".2f"), " and your interview will be on ", date[2] , ".", sep="")
elif int(case)>=10:
s_case = int(input("The number of your successful cases: "))
f_case = int(case) - s_case
score = 5*s_case - 2*f_case + yold*0.4
if score > 70:
print("Your score is ", format(score,".2f"), " and your interview will be on ", date[0] , ".", sep="")
elif 40<score<=70:
print("Your score is ", format(score,".2f"), " and your interview will be on ", date[1] , ".", sep="")
elif score <= 40:
print("Your score is ", format(score,".2f"), " and your interview will be on ", date[2] , ".", sep="")
else:
print("Error: No such jobs available.")