Explain the error in the following sample of Ruby code. Reference the
line which the error is found on:
1- my_grade = “A+”
2-
3- if my_grade = “A+”
4- puts “PASSED!!!”
5- end
Explain the error in the following sample of Ruby code. Reference the
line which the error is found on:
1- my_grade = “A+”
2-
3- if my_grade = “A+”
4- puts “PASSED!!!”
5- end
On Jun 5, 10:24 am, Srinivas G. [email protected] wrote:
Explain the error in the following sample of Ruby code. Reference the
line which the error is found on:
Please do your homework yourself rather than sending countless emails
to the list with each of your assignments.
Fred
The obvious error is that if we do your work for you, you learn nothing.
Are you even trying to solve these? How are you studying Ruby to be
posed
these problems? If you’ve got classes then I’d suggest paying more
attention
in them; if you’re studying on your own, have you read all the materiel?
I’m
sure the answers have all been covered.
If you’re finding it difficult, then maybe the course is not for you,
because if you were working on a real project, the problems are not so
contrived, and the answers aren’t so obvious.
For this specific problem; consider (or Google) the difference between
assignment and comparison operators in Ruby.
On Jun 5, 2010 10:24 AM, “Srinivas G.” [email protected] wrote:
Explain the error in the following sample of Ruby code. Reference the
line which the error is found on:
1- my_grade = “A+”
2-
3- if my_grade = “A+”
4- puts “PASSED!!!”
5- end
–
You received this message because you are subscribed to the Google
Groups
“Ruby on Rails: Talk” group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected][email protected]
.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs