+ 1

Can anyone help me with this? I’ve been stuck on it for hours

Write a program using Python asking the user to enter three numbers: a starting value, an ending value, and an increment. The program should then "count" based on these criteria, as shown in the example below. (Complete using a for and a while loop.) This program counts for you. Enter the starting value: 3 Enter the ending value: 13 Enter the increment: 2 3 5 7 9 11 13 I’ve made a bit of progress with it at least it doesn’t say ‘Error’ anymore. Nevermind it’s back to saying ‘Error...’ https://code.sololearn.com/c136FCm4X9vn/?ref=app

18th Oct 2018, 2:13 AM
Gracie
6 odpowiedzi
+ 3
Use this to input a number: start = int(input()) Loop with this: for number in range(start, end+1, step): Display your value with this: print(number)
18th Oct 2018, 2:59 AM
John Wells
John Wells - avatar
+ 1
Link your code to get help with it. Either use the plus in a circle icon or share to clipboard and paste here.
18th Oct 2018, 2:40 AM
John Wells
John Wells - avatar
+ 1
Run this with these three lines at the prompt: 3 13 2 https://code.sololearn.com/c838FMXQZ7Rv
18th Oct 2018, 12:10 PM
John Wells
John Wells - avatar
+ 1
Thank you so so much.
18th Oct 2018, 12:24 PM
Gracie
0
everything’s good excpet for when you run the program with or without numbers it always says there’s an ‘expected indentured block’ for print
18th Oct 2018, 11:47 AM
Gracie
0
Python code requires statements within a scope to all have the same indent. Your for statements start a new scope so all statements within it must be nested with a larger indent than the for statement.
18th Oct 2018, 12:05 PM
John Wells
John Wells - avatar