Hi, in this can I use the following code?:
def graduation_reqs(gpa, credits):
if (gpa >= 2.0) and (credits >= 120):
return “You meet the requirements to graduate!”
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?