Enrolling

Report a typo

Imagine, you are developing a rule in terms of logical and comparison operations to determine whether you should enroll a student in your course or not. The rule itself looks like this:

enroll_student = ((average_grade >= 40 and recommended_by_tutor) 
            or (finished_introductory_course and introductory_course_grade > 85))

Parameters meaning:

  • average_grade is an integer variable that shows the student's average grade.
  • recommended_by_tutor is a bool variable that shows whether the student has a recommendation from the tutor.
  • finished_introductory_course is a bool variable that shows whether the student finished the introductory course.
  • introductory_course_grade is an integer variable that shows the student's introductory course grade.

The table of students who wish to enroll:

average_grade recommended_by_tutor finished_introductory_course introductory_course_grade
Anne 49 True False 0
John 41 False True 76
Frank 37 True True 97
Victoria 40 True True 86
Mary 49 False True 85
Sam 33 False True 51

Using this rule select all the students to enroll.

Select one or more options from the list
___

Create a free account to access the full topic