本文整理汇总了Python中student.Student.make_course_plan方法的典型用法代码示例。如果您正苦于以下问题:Python Student.make_course_plan方法的具体用法?Python Student.make_course_plan怎么用?Python Student.make_course_plan使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类student.Student
的用法示例。
在下文中一共展示了Student.make_course_plan方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: render_browser
# 需要导入模块: from student import Student [as 别名]
# 或者: from student.Student import make_course_plan [as 别名]
student_sem = SEM_LEFT[i]
return [student_major, courses_taken, student_sem]
def render_browser(courses_left):
"""this funciton takes in the output of 'make_course_plan' and makes it visually pleasing"""
chart = Dot(x_label_rotation=30, show_legend=False)
chart.title = 'Your Course Plan'
chart.x_labels = ['Course 1', 'Course 2', 'Course 3', 'Course 4 (Semi-Optional)', 'Course 5 (Optional)']
for semester in courses_left:
#print semester
courses = []
for i, course in enumerate(courses_left[semester]):
if course[2] == 'AHSE':
something_else = {'value': course[1], 'label': course[0], 'color': 'rgba(204, 153, 255, 1)'}
if course[2] == 'ENGR':
something_else = {'value': course[1], 'label': course[0], 'color': 'rgba(51, 153, 255, 1)'}
if course[2] == 'SCI':
something_else = {'value': course[1], 'label': course[0], 'color': 'rgba(153, 255, 51, 1)'}
if course[2] == 'MATH':
something_else = {'value': course[1], 'label': course[0], 'color': 'rgba(255, 153, 51, 1)'}
if course[2] == 'GENERAL':
something_else = {'value': course[1], 'label': course[0], 'color': 'rgba(192, 192, 192, 1)'}
courses.append(something_else)
#print courses
chart.add('Semester =' + str(semester), courses)
return chart.render_in_browser()
creation = make_input(make_gui())
stu = Student(creation[0], creation[1], creation[2])
render_browser(stu.make_course_plan())