From: Jonan Scheffler Date: 2013-05-16T07:19:30+09:00 Subject: Re: n00b looking to learn from the best --089e0153873eb397a704dcc92474 Content-Type: text/plain; charset=ISO-8859-1 Look up each_with_index. On May 15, 2013 3:17 PM, "Flex Philips" wrote: > Hey Rubyians! > > I am not used to joining online forum's and I am eager to join the Ruby > community. This is the first language I am learning and have a practice > problem that I cannot seem to get. Can you enlighten me? I'm looking > forward to learning from all of you! > > Here is the question: > > Write a method named lassy_sum(numbers) that takes an array of numbers. > lassy_sum should multiply each number in the array by its position in > the array, and return the sum. > > I don't quite understand how to multiply each number in the array by its > position in the array. Any help will be greatly appreciated! Thanks. > > Flex > > -- > Posted via http://www.ruby-forum.com/. > > --089e0153873eb397a704dcc92474 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

Look up each_with_index.

On May 15, 2013 3:17 PM, "Flex Philips"= ; <lists@ruby-forum.com> = wrote:
Hey Rubyians!

I am not used to joining online forum's and I am eager to join the Ruby=
community. This is the first language I am learning and have a practice
problem that I cannot seem to get. Can you enlighten me? I'm looking forward to learning from all of you!

Here is the question:

Write a method named lassy_sum(numbers) that takes an array of numbers.
lassy_sum should multiply each number in the array by its position in
the array, and return the sum.

I don't quite understand how to multiply each number in the array by it= s
position in the array. Any help will be greatly appreciated! Thanks.

Flex

--
Posted via http://= www.ruby-forum.com/.

--089e0153873eb397a704dcc92474--