We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uses recursion to get all the prerequisites required for a course, stored in the preq field of Course
preq
Course
Relevant code:
ubcexplorer.py
Consider the tree:
What should be stored:
{child1: {}, child2: {child21: {}, child22: {}}, child3: {}}
Immediate prerequisites of MATH 256 (under key preq in dictionary that course_info() returns):
course_info()
['MATH 101', 'MATH 103', 'MATH 105', 'MATH 121', 'SCIE 001', 'MATH 152', 'MATH 221', 'MATH 223']
Prerequisites of MATH 223 include MATH 121. Prerequisites of MATH 121 include MATH 120 and MATH 100.
What course_info_with_prereq_tree("MATH", "256") should return:
course_info_with_prereq_tree("MATH", "256")
{..., MATH 223: {MATH 121: {MATH 120: {}, MATH 100: {}, ...}, ...}}
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Uses recursion to get all the prerequisites required for a course, stored in the
preq
field ofCourse
Relevant code:
ubcexplorer.py
Example
Consider the tree:
![image](https://user-images.githubusercontent.com/65756895/103341189-1291c100-4a3b-11eb-8fc6-7b013fe74afc.png)
What should be stored:
Real Example
Immediate prerequisites of MATH 256 (under key
preq
in dictionary thatcourse_info()
returns):Prerequisites of MATH 223 include MATH 121. Prerequisites of MATH 121 include MATH 120 and MATH 100.
What
course_info_with_prereq_tree("MATH", "256")
should return:The text was updated successfully, but these errors were encountered: