You are viewing a single comment's thread. Return to all 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)
Seems like cookies are disabled on this browser, please enable them to open this website
Day 2: Operators
You are viewing a single comment's thread. Return to all 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
if name == 'main': meal_cost = float(input().strip())