Sort by

recency

|

3398 Discussions

|

  • + 0 comments

    Do you know python? I need some clarity this side,if you can.

    Thank you.

  • + 0 comments

    System.out.println(Math.round(meal_cost*(1+(tip_percent/100.00)+tax_percent/100.00)));

  • + 0 comments

    def solve(meal_cost, tip_percent, tax_percent):

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

    if name == 'main': meal_cost = float(input().strip())

    tip_percent = int(input().strip())
    
    tax_percent = int(input().strip())
    
    solve(meal_cost, tip_percent, tax_percent)
    
  • + 0 comments
    System.out.println(Math.round(meal_cost + meal_cost * tip_percent/100. + meal_cost * tax_percent/100.) );
    
  • + 0 comments

    Python

    import math import os import random import re import sys

    def solve(meal_cost, tip_percent, tax_percent): # Write your code here tip = (tip_percent/100) * meal_cost tax = (tax_percent/100) * meal_cost

    total_price = round(tax + tip + meal_cost)
    print(total_price)
    

    if name == 'main': meal_cost = float(input().strip())

    tip_percent = int(input().strip())
    
    tax_percent = int(input().strip())
    
    solve(meal_cost, tip_percent, tax_percent)