Python Forum
Populating a timetable with subjects
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Populating a timetable with subjects
#1
Hello All,

We have to populate a timetable with subjects. What would be the best approach?

In our sample timetable there are 25 hours (keys), all the FH value should be replaced with random subjects as many as their corresponding hour.

timetable = [{'A1': "FH", 'B1': "FH", 'C1': "FH", 'D1': "FH", 'E1': "FH"},
{'A2': "FH", 'B2': "FH", 'C2': "FH", 'D2': "FH", 'E2': "FH"},
{'A3': "FH", 'B3': "FH", 'C3': "FH", 'D3': "FH", 'E3': "FH"},
{'A4': "FH", 'B4': "FH", 'C4': "FH", 'D4': "FH", 'E4': "FH"},
{'A5': "FH", 'B5': "FH", 'C5': "FH", 'D5': "FH", 'E5': "FH"}]

subjects_required_hours = {"S1": 4, "S2": 3, "S3": 5, "S4": 3, "S5": 5, "S6": 5}

Thanks
Britto
Reply


Messages In This Thread
Populating a timetable with subjects - by brittocj - May-02-2019, 02:51 AM
RE: Populating a timetable with subjects - by buran - May-02-2019, 07:00 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Populating an array dynamically zxcv101 1 1,149 May-17-2022, 11:24 AM
Last Post: deanhystad
  Populating Array2 from Array1 PappaBear 1 2,065 Aug-22-2018, 04:30 AM
Last Post: PappaBear
  Populating a list with divisors RedSkeleton007 1 2,183 Aug-21-2018, 12:52 AM
Last Post: Larz60+
  populating csv and searching the file mepyyeti 1 2,968 Apr-26-2018, 03:02 AM
Last Post: woooee
  for loop and list populating mepyyeti 3 3,471 Apr-12-2018, 03:06 AM
Last Post: buran
  Importing file in dataframe and populating missing column name vvv 1 3,463 Feb-26-2017, 02:32 PM
Last Post: sparkz_alot

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020