当前位置: 首页>>代码示例>>Python>>正文


Python Student.returnMajor方法代码示例

本文整理汇总了Python中student.Student.returnMajor方法的典型用法代码示例。如果您正苦于以下问题:Python Student.returnMajor方法的具体用法?Python Student.returnMajor怎么用?Python Student.returnMajor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在student.Student的用法示例。


在下文中一共展示了Student.returnMajor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: print

# 需要导入模块: from student import Student [as 别名]
# 或者: from student.Student import returnMajor [as 别名]
import sys
from student import Student

print("Start driver")

# (Required) Create an instance of student
p = Student("CS")
 
# (Optional)
#p.setMajor("CHM")

# (Optional) Returning the Student's Major
print("Major set to " + p.returnMajor())

# (Optional) Lets the parser know which classes matter for major.
#   If the Major is set, as above, this will be done automatically. 
#   This is legacy code, useful for testing new variations of Major requirements
#p.defineMajorReqs("DATA/required_PHY_courses.csv")
#p.defineMajorReqs()

# (Required) Parse text transcript for any classes
#   Class defined as two or three letters, followed by two or three spaces,
#   and then two or three numbers.
p.parseTranscript("DATA/jesse_unofficial_transcript.txt")

# (Required) Compare the Major requirements to the parsed transcript
p.compareMajorToTranscript()

# (Optional) Prints out Major Requirements in a Block Format
p.printMajorReqs()
开发者ID:lucentlab,项目名称:advising-visualizer,代码行数:32,代码来源:driver.py


注:本文中的student.Student.returnMajor方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。