I’ve written a small program in python 3.2 that takes numbers as an input and counts them by a user chosen amount. For some reason I’ve been getting some syntax errors.
Here’s the code.
start = input(int("Starting number: "))
ending = input(int("Ending number: "))
tick = input(int(("Interval: "))
print("Counting by", tick)
print(for i in range(start, ending, tick):
print(i, end = " ")
The errors occur in the print functions for “Counting by” and for i in range. In addition the colon on the fifth line is also seen as a syntax error.
1 Answer