
Jeffrey Z. answered 06/21/20
UPenn Grad Experienced in tutoring Finance, Computer Science, and Math
If you want this to be a function that the user can edit, you can have the input parameters be the start, end, and step values. Then you can pass these into the parameters of the for loop. Inside the for loop, you can have the program print out the index of the for loop. Hope this helps. Feel free to reach out if you have further questions!