The difficulty lies in the fact that the function has 2 input functions.
name_of_numbers = {1: 'Первый', 2: 'Второй', 3: 'Третий', 4: 'Червертый', 5: 'Пятый', 6: 'Шестой', 7: 'Седьмой', 8: 'Восьмой', 9: 'Девятый', 10: 'Десятый', 11: 'Одиннадцатый', 12: 'Двенадцатый', 13: 'Тринадцатый', 14: 'Четырнадцатый', 15: 'Пятнадцатый', 16: 'Шестнадцатый', 17: 'Семнадцатый', 18: 'Восемнадцатый', 19: 'Девятнадцатый'}
def get_dictionary() -> dict:
database = dict()
amount_of_orders = int(input('Количество заказов: '))
for number in range(1, amount_of_orders + 1):
customer, pizza_name, count = input(f'{name_of_numbers[number]} заказ: ').split()
if customer in database:
if pizza_name in database[customer]:
database[customer][pizza_name] += int(count)
else:
database[customer][pizza_name] = count
else:
database[customer] = dict({pizza_name: int(count)})
return database