subject

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)

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 16:10
What is the ooh? a. omaha occupation handbook b. online occupational c. occupations online d. occupational outlook handbook select the best answer from the choices provided
Answers: 3
question
Computers and Technology, 24.06.2019 00:30
Use the keyword strategy to remember the meaning of the following word. the meaning for the word has been provided. write your keyword and describe the picture you would create in your mind. obfuscate: to make something so confusing that it is difficult to understand.
Answers: 2
question
Computers and Technology, 24.06.2019 08:00
Can someone work out the answer as it comes up in one of my computer science exams and i don't understand the cryptovariables
Answers: 1
question
Computers and Technology, 24.06.2019 12:40
Match the feature to the network architecture. expensive to set up useful for a small organization easy to track files has a central server inexpensive to set up difficult to track files useful for a large organization does not have a central server client- server network peer-to-peer network
Answers: 3
You know the right answer?
We are passing in 3 inputs.
a list of numbers
a multiplier value, m
a value, n
Questions
question
Mathematics, 20.06.2020 19:57
Questions on the website: 13722363