def graduation_reqs(gpa, credits):
if (gpa >= 2.0) and (credits >= 120):
return “You meet the requirements to graduate!”
else:
return “You do not meet the GPA or the credit requirement for graduation.”
So, if someone doesn’t meet either or both the requirements, he would get the message “You do not meet the GPA or the credit requirement for graduation.”, instead of writing extra lines of code mentioning other conditions.
According to me, this should work if either one or both the conditions are unmet. Is that correct?