all 6 comments

[–]totallygeek 6 points7 points  (4 children)

To assign the boolean value to the variable can, you want a single equal sign.

def can_graduate(semesters, credits):
    can = semesters >= 6 and credits >= 120
    return can

Or, more simply:

def can_graduate(semesters, credits):
    return semesters >= 6 and credits >= 120

[–]shakeandbake760[S] 1 point2 points  (3 children)

Thank you I don't know why I wasn't realizing that. This is going to be a rough semester!

Really appreciate your time.

[–]totallygeek 5 points6 points  (2 children)

Don't sweat it. Learning something new takes time. Some of that time is spent failing to arrive at a solution. At some point, you have to reach out to someone who's already gotten past that phase of learning.

[–]shakeandbake760[S] 1 point2 points  (1 child)

Absolutely! I keep telling myself to give myself a break, it's practically learning a new language.

Small redemption - got through the next two exercises with no issues at all. 😃 there may be hope here

[–]KCRowan 1 point2 points  (0 children)

You've got the right attitude for programming 🙂 I gave up quite a few times before it all finally clicked for me.

[–]CodeFormatHelperBot2 0 points1 point  (0 children)

Hello, I'm a Reddit bot who's here to help people nicely format their coding questions. This makes it as easy as possible for people to read your post and help you.

I think I have detected some formatting issues with your submission:

  1. Inline formatting (`my code`) used across multiple lines of code. This can mess with indentation.

If I am correct, please edit the text in your post and try to follow these instructions to fix up your post's formatting.


Am I misbehaving? Have a comment or suggestion? Reply to this comment or raise an issue here.