• Сможете проверить правильность моего решения?

    @dessewe
    sausages = 10
    buns = 8
    number_participans = int(input('enter number of participans: '))
    number_hot_dogs = int(input('enter number of hot dogs: '))
    number_sausages = number_participans * number_hot_dogs
    number_buns = number_participans * number_hot_dogs

    if number_participans == 0 or number_hot_dogs == 0:
    print('no party')
    else:
    sausages_pack = int(number_sausages / sausages + 1)
    print('number of sausages pack is: ', sausages_pack)
    sausages_remains = sausages - number_sausages % sausages
    print('sausaged remains is: ', sausages_remains)

    buns_pack = int(number_buns / buns + 1)
    print('number of buns pack is: ', buns_pack)
    buns_remains = buns - number_buns % buns
    print('buns remains is: ', buns_remains)
    Ответ написан
    Комментировать