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)

25th Jan 2019, 10:43 PM
mtechnic
2 Respuestas
+ 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.
26th Jan 2019, 12:52 AM
Anna
Anna - avatar
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
25th Jan 2019, 10:59 PM
Gordon
Gordon - avatar