使用Python 3的Genrate时间表 [英] Genrate timetable using Python 3
问题描述
我需要为每周5天生成一个时间表
每天7堂课
学生只能在一个地方与老师相同的时间
每周每个科目最少3个
用户必须能够编辑学习每个科目的学生>
(我想到了每个主题的列表及其所需的索引)
i与逻辑挣扎)
请帮我用#comments编写项目帮助
或algorythm我可以关注
我尝试过:
#subjects
subjectn =('你想要编辑什么科目')
subject = []
适用于学科的学生:
student = input('Name of'学生你想添加')
subject.insert(学生,学生)
添加=输入('添加另一个学生Y / N?:')
#如果加上=='Y'or'y':坏你语法之处
#然后传递#useless
#如果加上=='N'或'n':
#break
i need to generate a timetable
for a 5 day week
7 lessons per day
students can only be in one palce at a time same with teachers
minimuim of 3 of each subject per week
user must be able to edit students taking each subject
(i thought of a list for each subject and in it index of who takes it)
i struggling with logic)
Please can i have help coding the project with #comments please
or a algorythm i can follow
What I have tried:
#subjects
subjectn = ('What subject do you wish to edit')
subject = []
for students in subject:
student = input('Name of student you wish to add')
subject.insert(students, student)
Add = input('add another student Y/N? :')
# if Add == 'Y'or'y': bad use of syntax
# then pass #useless
# if Add == 'N' or 'n':
# break
推荐答案
可能比您想象的更复杂:自动生成的算法
学校讲座使用启发式方法 [ ^ ]
Possibly more complicated than you think: An Algorithm to Automatically Generate Schedule for
School Lectures Using a Heuristic Approach[^]
这篇关于使用Python 3的Genrate时间表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!