self.msg = ""
self.top = []
self.topeq = []
+ self.isuff = {1: "st", 2: "nd", 3: "rd", 4: "th", 5: "th"}
return None
def getMsg(self):
self.computeEqualDrinkers()
totl = [c for (un, c) in self.top]
tot = sum(totl)
- isuff = {1: "st", 2: "nd", 3: "rd", 4: "th", 5: "th"}
i = 1
for drinkers in self.topeq[:5]:
c = drinkers[0][1]
d = [un for (un, c) in drinkers]
- self.msg += "{}{}".format(i, isuff[i])
+ self.msg += "{}{}".format(i, self.isuff[i])
if len(d) > 1:
self.msg += " are "
else: