Код: Выделить всё
def potato_quant(number):
if number >= 5 and number < 100:
print("You've got more than 5 potatoes. Making a big meal eh?")
elif number >= 100 and number < 10000:
print("You've got more than 100 potatoes! What do you need all those potatoes for?")
elif number >= 10000 and number < 40000:
print("You've got more than 10000! Nobody needs that many potatoes!")
elif number >= 40000:
print("You've got more than 40000 potatoes. wut.")
elif number == 0:
print("No potatoes eh?")
elif number < 5:
print("You've got less than five potatoes. A few potatoes go a long way.")
else:
return 0
def potato_type(variety):
if variety == "Red":
print("You have chosen Red potatoes.")
elif variety == "Sweet":
print("You have chosen the tasty sweet potato.")
elif variety == "Russet":
print("You've got the tasty average joe potatoe!")
else:
print("Nice potato!")
print(potato_quant(15000) + potato_type("Sweet"))
Код: Выделить всё
TypeError: unsupported operand type(s) for +: 'NoneType' and 'NoneType'
Подробнее здесь: https://stackoverflow.com/questions/341 ... d-nonetype
Мобильная версия