Sort by

recency

|

3406 Discussions

|

  • + 0 comments

    tip = tip_percent * meal_cost / 100 tax = tax_percent * meal_cost / 100 total_bill = meal_cost + tip + tax print(round(total_bill))

  • + 0 comments

    JavaScript CODE

    let tip = tip_percent * meal_cost / 100;
    let tax = tax_percent * meal_cost / 100;
        
    console.log(Math.round(tip + tax + meal_cost));
    
  • + 1 comment

    Hi, Why this statement doesn't work?? double tip=(tip_percent/100)meal_cost; instead if I give (tip_percent)(meal_cost/100); will work

  • + 0 comments

    Write your code here

    # compute tip and tax amounts
    tip  = meal_cost * tip_percent / 100
    tax  = meal_cost * tax_percent / 100
    
    # total cost
    total_cost = meal_cost + tip + tax
    
    # Print rounded total (nearest integer)
    print(round(total_cost))
    
  • + 0 comments

    i am using def function but this is not exixt