Ump will be assigned to word2
word1[0:3] gets all of the letters from index 0 to index 3 exclusive (that means index 3 is not included)
Answer:
Please check the attachment.
Explanation:
avg turnaround time = (38+7+42+33+18)/5= 27.6
avg waiting timee = (33+5+28+23+17)/5= 21.2
And its D, A C in Gantt chart at last and exit time are 33, 38 and 42 mentioned as last three in Gantt chart.
I am not too familiar with the Python language, but the algorithm would be something like this:
1. create a variable for the sums of the number
2. read in how many numbers the user wants to enter (let's call it N)
and then create a for loop:
for N times
read in the next number
increase the sum variable by that number
Hopefully this helps!