def test_cmputIndex(self):
     student1 = StudentNode("123456", "ART", "Tosin", "Kuye")
     student2 = StudentNode("555555", "ART", "Matthew", "Jones")
     student3 = StudentNode("654321", "ART", "Matthew", "Jones")
     table = EnrollTable(35)
     self.assertEqual(table.cmputIndex(student1.getID()), 32)
     self.assertEqual(table.cmputIndex(student2.getID()), 20)
     self.assertEqual(table.cmputIndex(student3.getID()), 24)
Exemple #2
0
from enrollStudent import EnrollTable

table = EnrollTable(35)
finder = 20
i = 999999
c = 0
while i > 100000 and c < 10:
    if table.cmputIndex(str(i)) == 20:
        print(i)
        c += 1
    i -= 1