We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
import math
import os
import random
import re
import sys
#
Complete the 'solve' function below.
#
The function accepts following parameters:
1. DOUBLE meal_cost
2. INTEGER tip_percent
3. INTEGER tax_percent
#
def solve(meal_cost, tip_percent, tax_percent):
b=(meal_cost/100)*tip_percent
c=(meal_cost/100)*tax_percent
sums=(meal_cost+b+c)
a=int(sums)
print(a) # Write your code here
if name == 'main':
meal_cost = float(raw_input().strip())
tip_percent = int(raw_input().strip())
.....isme 3rd case m wrong ans aa ra h koi btaega kya mistake h
tax_percent = int(raw_input().strip())
solve(meal_cost, tip_percent, tax_percent)
Cookie support is required to access HackerRank
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 →
import math import os import random import re import sys
#
Complete the 'solve' function below.
#
The function accepts following parameters:
1. DOUBLE meal_cost
2. INTEGER tip_percent
3. INTEGER tax_percent
#
def solve(meal_cost, tip_percent, tax_percent): b=(meal_cost/100)*tip_percent c=(meal_cost/100)*tax_percent sums=(meal_cost+b+c) a=int(sums) print(a) # Write your code here
if name == 'main': meal_cost = float(raw_input().strip())