Я пытаюсь создать madlibs для небольшого задания hw. Попытка исправить эту ошибку в строке 15.
Я пытался использовать "str (None)" вместо просто плана "''"
import random
print('Time for M A D L I B S')
print('Enter examples of some zany words for each category!! Use quote marks')
random_name = input("Enter random name:")
your_name = input('Enter your own name:')
place = input('Enter a place:')
adjective = input('Enter an adjective:')
adjs = ['crazy', 'nice', 'awesome', 'big','tiny']
verbs = ['met', 'ran', 'farted', 'sat on', 'hugged']
prepositions = ['above the', 'near the', 'around the', 'behind', 'beside']
print(random.choice(adjs)) + ' ' + random_name + ' ' + print(random.choice(verbs)) + ' ' + your_name + ' ' + print(random.chioce(prepositions)) + ' ' + adjective + ' ' + place
Traceback (most recent call last):
File "madlibs.py", line 15, in <module>
print(random.choice(adjs)) + ' ' + random_name + ' ' + print(random.choice(verbs)) + ' ' + your_name + ' ' + print(random.chioce(prepositions)) + ' ' + adjective + ' ' + place
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'