I am unsure why I am getting this error
count=int(input ("How many donuts do you have?"))
if count <= 10:
print ("number of donuts: " ) +str(count)
else:
print ("Number of donuts: many")
In python3, print
is a function that returns None
. So, the line:
print ("number of donuts: " ) +str(count)
you have None + str(count)
.
What you probably want is to use string formatting:
print ("Number of donuts: {}".format(count))