so in the 2nd exercise (graduation_reqs function) the default solution is this:
def graduation_reqs(credits):
if credits >= 120:
return “You have enough credits to graduate!”
print(graduation_reqs(120))
So instead of using the print command in order to get the result i wanted to make it more straight by using only the functions name and the input number in it. So i did this and i got error. Can u please explain me why i get error from this?:
def graduation_reqs(credits):
if credits >= 120:
print(“You have enough credits to graduate!”)
I dont get it. By creating a function we tell the program that when we type its name everytime its gonna repeat some certain steps in order. So when i type:
def graduation_reqs(credits):
if credits >= 120:
print(“You have enough credits to graduate!”)
graduation_reqs(120)
By evaluating that credits >= 120 as true it should move to the next step which is the print command right?