Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Homework commit #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Homework commit #25

wants to merge 1 commit into from

Conversation

Core966
Copy link

@Core966 Core966 commented Feb 16, 2014

Finished homework, the output is same as given. Thanks.

@@ -11,6 +11,10 @@ def senior?
grade == 12
end

def junior?
grade <= 11 and grade > 8
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Ruby, while "and" exists, it's not quite a synonym for "&&" --- so, in comparisons like this, you should use "&&"

More information on the topic: http://devblog.avdi.org/2010/08/02/using-and-and-or-in-ruby/

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! You saved me ahead from a lot of trouble!

@jwo
Copy link
Member

jwo commented Feb 17, 2014

Looks great, nice submission... Also, I can tell the non-US developers by how they approach the junior? method. If you're in the US, it's grade == 11, and pretty much everywhere else it's something different. (amusing to me) :)

@Core966
Copy link
Author

Core966 commented Feb 17, 2014

It was even different within Hungary some time ago, when I was in a foundation high school, they added extra grades. (In mine there were two optional extra grades.) Of course, since then, the education system has changed a lot to be more uniform compared to other countries. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants