Sort by

recency

|

1825 Discussions

|

  • + 0 comments

    Python 3

    def bonAppetit(bill, k, b):
        both = bill.copy()
        both.remove(bill[k])
        
        print("Bon Appetit") if sum(both)/2 == b else print(int(b - sum(both)/2))    
    
  • + 0 comments

    If you’re planning a project, hiring experienced professionals can make a big difference in the outcome. Proper planning helps avoid delays and unexpected costs, especially in kitchen or bathroom renovations. For anyone tackling a home renovation Toronto, it’s important to choose contractors familiar with local building codes and materials. Paying attention to layout, lighting, and storage can maximize both space and functionality. Even small upgrades, like flooring or fixtures, can significantly increase property value. Taking the time to research and plan ensures a smoother, more successful renovation experience.

  • + 0 comments

    Mi solución en python 3:

    def bonAppetit(bill, k, b):
        # Write your code here
        suma = 0
        for j in range(len(bill)):
            if j != k:
                suma += bill[j]
            
        respuesta = suma//2
        if respuesta == b:
            print('Bon Appetit')
        else:
            res = b-respuesta
            print(res)
    
  • + 0 comments

    Python 3 Solution:

    def bonAppetit(bill, k, b):
        # Write your code here
        brian_bill = [value for index, value in enumerate(bill) if index != k]
        brian_total_bill = sum(brian_bill) // 2
        
        if b <= brian_total_bill:
            print('Bon Appetit')
        else:
            print(b - brian_total_bill)
    
  • + 0 comments

    When dividing bills among roommates or friends, clear communication is essential to avoid disputes. Use apps or spreadsheets to track expenses fairly. If a disagreement leads to debt collection or harassment, it's important to know your rights about Corte Vibe.