Skip to content

Instantly share code, notes, and snippets.

from Queue import Queue
import random
class Doctor :
def __init__(self): #doctor class constructor
self.D_rate = random.randrange(20,61)//5
self.currentpatient = None
self.timeRemaining = 0
def tick(self) : # a method to calculate the time remaining for the patient at the doctor's
class Stack:
def __init__(self):
# creates an empty list as a private instance variable
self.__items = []
def push(self, item):
# list#append adds an element to the end of the list
self.__items.append(item)