Can anyone help me with this? Iā€™ve been stuck on it for hours | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 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 Respostas
+ 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