Sorry if this is too noob for this forum, but I’m literally just getting
started with learning how to code. I’m having a hard time figuring out
the order of operations for Ruby.
25 + 30 / 6 = 30
I totally get this. It takes 25 + (30/6).
100 - 25 * 3 % 4 = 97
I get this too. It’s basically taking 100 minus 4% of 75.
But I can’t for the life of me get this:
3 + 2 + 1 - 5 + 4 % 2 - 1 / 4 + 6 = 7
Can someone please explain this one to me? I understand that because the
code isn’t using a floating decimal it’s going to be off. But I can’t
even get close to figuring out how the above comes to 7.
This seems so simple that I should be able to figure it out. Maybe
coding is not for me? Would really appreciate some help. Thanks.