We are passing in 3 inputs.
a list of numbers
a multiplier value, m
a value, n
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.
if there are less than n elements then you should output the unchanged input list.
this is what i have and it doesn't work!
# get our input from the command line
import sys
m= int(sys. argv[2])
n= int(sys. argv[3])
# convert strings to integers
numbers= sys. argv[1].split(',')
for i in range(0, len(numbers)):
numbers[i]= int(numbers[i])
# your code goes here
# i hate that i am not getting this better!
count = -1
while (count < len(numbers)):
numbers[count] = numbers[count]*m
count = count + n;
print (numbers)