File tree Expand file tree Collapse file tree 1 file changed +21
-4
lines changed
[2.2] Fundamentals Exam - Exercises/[1.1] Mid Exam Expand file tree Collapse file tree 1 file changed +21
-4
lines changed Original file line number Diff line number Diff line change 1
1
first_employee = int (input ())
2
2
second_employee = int (input ())
3
3
third_employee = int (input ())
4
- students = int (input ())
4
+ students_questions = int (input ())
5
5
6
6
total_employees = first_employee + second_employee + third_employee
7
7
hour_counter = 0
8
8
9
- while students > 0 :
9
+ while students_questions > 0 :
10
10
if hour_counter % 4 == 0 :
11
11
hour_counter += 1
12
12
13
- students -= total_employees
13
+ students_questions -= total_employees
14
14
15
- if students <= 0 :
15
+ if students_questions <= 0 :
16
16
break
17
17
18
18
hour_counter += 1
19
19
20
20
print (f"Time needed: { hour_counter } h." )
21
+
22
+
23
+ # Different Solution:
24
+
25
+ # employee_info = [int(input()) for num in range(4)]
26
+ #
27
+ # answers_per_hr = sum(employee_info[:-1])
28
+ # students_questions = employee_info[-1]
29
+ # time_needed = 0
30
+ #
31
+ # while students_questions > 0:
32
+ # time_needed += 1
33
+ #
34
+ # if time_needed % 4 != 0:
35
+ # students_questions -= answers_per_hr
36
+ #
37
+ # print(f"Time needed: {time_needed}h.")
You can’t perform that action at this time.
0 commit comments