Sort by

recency

|

3404 Discussions

|

  • + 0 comments

    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

  • + 0 comments

    function solve(meal_cost, tip_percent, tax_percent) { // Write your code here const tip = (tip_percent/100) * meal_cost; const tax = (tax_percent/100) * meal_cost; const total_cost = meal_cost + tip + tax; console.log(Math.floor(total_cost)); } why my code doesn't work for the last test case that it works fine for the rest three test cases.

  • + 0 comments

    print(round((meal_cost + (meal_cost * tip_percent / 100) + (meal_cost * tax_percent / 100))))