title: Multiplying every Nth element in a list by M
body: <p>I have a problem I can't seem to figure out.  I am very new to Python and have only been coding for three weeks.  Any help is appreciated.</p>
  <h1>Problem:</h1>
  <p>We are passing in 3 inputs:</p>
  <ul>
  <li>a list of numbers</li>
  <li>a multiplier value, M</li>
  <li>a value, N</li>
  </ul>
  <blockquote>
  <p>You should multiply every Nth element (do not multiply the 0th element) by M. So if N is 3, you start with the 3rd element, which is index 2.</p>
  <p>If there are less than N elements then you should output the unchanged input list.</p>
  </blockquote>
  <p>I can't seem to figure this out.  I have tried many different things here. Currently, I have the following, which is not working at all.</p>
  <h1>Provided:</h1>
  <pre><code>import sys
  M= int(sys.argv[2])
  N= int(sys.argv[3])
  
  numbers= sys.argv[1].split(',')
  for i in range(0, len(numbers)):
    numbers[i]= int(numbers[i])
  </code></pre>
  <h1>My Code:</h1>
  <pre><code>for N in numbers:
      if numbers[i] &gt; 0:
      total = N * M
      print(total)
  else:
      print(numbers)
  </code></pre>
  <h1>Output:</h1>
  <p>I am not even close to what the output should be. Feeling lost on this. Here is what my code comes to. It looks like they want the output in a list.</p>
  <pre class="lang-none prettyprint-override"><code>Program Failed for Input: 1,2,3,4,5,6 5 3
  Expected Output: [1, 2, 15, 4, 5, 30]
  Your Program Output:
  5
  10
  15
  20
  25
  30
  </code></pre>