0
"None" value during input
Why, if I execute the code below and input a data, on the screen appears a "none" value? a = int(input(print("Start: \n"))) print(a) b = int(input(print("End: \n"))) print(b) c = int(input(print("Step: \n"))) print(c) numbers = list(range(a, b, c)) print(numbers)
2 odpowiedzi
+ 3
That's the return value of the print statement within your inputs(). input() doesn't need print(). Just use b = int(input("End: \n")) instead of b = int(input(print("End: \n"))) etc.
0
Means your range doesn't generate any number based on your input
For range(a, b, c)
a is start
b is end
c is step
Use positive step when end > start
Use negative step when start > end
Also start+step must not >= end