OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

How to fix "TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'"?

  • Thread starter Thread starter user2101517
  • Start date Start date
U

user2101517

Guest
I am unsure why I am getting this error

Code:
count=int(input ("How many donuts do you have?"))
if count <= 10:
    print ("number of donuts: " ) +str(count)
else:
    print ("Number of donuts: many")
<p>I am unsure why I am getting this error</p>
<pre><code>count=int(input ("How many donuts do you have?"))
if count <= 10:
print ("number of donuts: " ) +str(count)
else:
print ("Number of donuts: many")
</code></pre>
 

Latest posts

Top