33Please note arrival time and burst
44Please use spaces to separate times entered.
55"""
6- from __future__ import annotations
6+ from typing import List
77
88import pandas as pd
99
1010
1111def calculate_waitingtime (
12- arrival_time : list [int ], burst_time : list [int ], no_of_processes : int
13- ) -> list [int ]:
12+ arrival_time : List [int ], burst_time : List [int ], no_of_processes : int
13+ ) -> List [int ]:
1414 """
1515 Calculate the waiting time of each processes
16- Return: list of waiting times.
16+ Return: List of waiting times.
1717 >>> calculate_waitingtime([1,2,3,4],[3,3,5,1],4)
1818 [0, 3, 5, 0]
1919 >>> calculate_waitingtime([1,2,3],[2,5,1],3)
@@ -72,8 +72,8 @@ def calculate_waitingtime(
7272
7373
7474def calculate_turnaroundtime (
75- burst_time : list [int ], no_of_processes : int , waiting_time : list [int ]
76- ) -> list [int ]:
75+ burst_time : List [int ], no_of_processes : int , waiting_time : List [int ]
76+ ) -> List [int ]:
7777 """
7878 Calculate the turn around time of each Processes
7979 Return: list of turn around times.
@@ -91,8 +91,8 @@ def calculate_turnaroundtime(
9191
9292
9393def calculate_average_times (
94- waiting_time : list [int ], turn_around_time : list [int ], no_of_processes : int
95- ):
94+ waiting_time : List [int ], turn_around_time : List [int ], no_of_processes : int
95+ ) -> None :
9696 """
9797 This function calculates the average of the waiting & turnaround times
9898 Prints: Average Waiting time & Average Turn Around Time
0 commit comments