You are viewing a single comment's thread. Return to all comments →
import math import os import random import re import sys
def solve(meal_cost, tip_percent, tax_percent): tip=float(meal_cost*(tip_percent/100)) tax=float(meal_cost*(tax_percent/100)) tc=float(meal_cost+tip+tax) print(round(tc)) if name == 'main': meal_cost = float(input())
tip_percent = int(input()) tax_percent = int(input())
solve(meal_cost, tip_percent, tax_percent)
Day 2: Operators
You are viewing a single comment's thread. Return to all comments →
!/bin/python3
import math import os import random import re import sys
Complete the solve function below.
def solve(meal_cost, tip_percent, tax_percent): tip=float(meal_cost*(tip_percent/100)) tax=float(meal_cost*(tax_percent/100)) tc=float(meal_cost+tip+tax) print(round(tc)) if name == 'main': meal_cost = float(input())
solve(meal_cost, tip_percent, tax_percent)