On 05/07/2019 07:25, Suhit Kumar wrote: > I am a student at an university. Currently I was working on an algorithm > using python. It is based on scheduling the teachers to their nearest > venues. And at the venues there can be atmost 400 teachers and these are to > be divided into the Batches of 40 i.e. ten batches. All the batches will > have teachers having same group number assigned to them.
Who assigns the group numbers? Is that the program or part of the data? > should get only the two days from the working days in the month. I have no idea what that means. How does time enter into the calculation? You allocate teachers to their *nearest* venue. Where does time enter into that? There must be some other criteria? You schedule to them to the nearest venue that they have not already visited within the last week/month or something? > This is only the last part of the complete algorithm. I am sending the > files associated to it and the code that I have made till now. The code got through but the data didn't. The server only permits text based attachments. However your code is over 300 lines long and poorly structured (hint create some well named functions!) Meanwhile you have not given us any clues about what kind of help you need. Does it work? Does it fail with an error - what error? Does it fail to load the data correctly - in what way? You cannot seriously expect us to wade through 300+ lines of code that, by your own admission, only partially describes the problem with nothing more than a loosely defined problem description. > Please help me in making it as I need it urgently. We won't do your homework for you. Tell us what you are having difficulties with and we will try to help. But first, for all our sakes, go back and restructure your code into functions with reasonable names. Each one performing one clearly defined part of your solution. Then perhaps it will be easier to see where the issue(s) lie and certainly easier to describe them. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor