def Tempurature(Lowest, Highest):
ok = False
while not ok:
try:
Input = int(input(print("\nEnter the Mid-Day tempurature for Day {}:".format(Counter))))
if Input >= Lowest and Input <= Highest:
ok = True
return Input
else:
print ("Please enter a valid number between {} and {}".format(Lowest, Highest))
except:
print ("Please enter a number")
So this is my Function, I use it to input numbers into an array like so
Counter = int(1)
TempDay = array.array ("i", range(31))
TempDay[Counter] = (Tempurature(-90, 60))
However when I call up the function, the following prints
Enter the Mid-Day tempurature for Day 1:
None
Any solutions on how to get rid of the "None" print to make the input line at the ":" rather than at the end of the "None"?