• + 20 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):
    
        if __name__ == '__main__':
            meal_cost = float(input())
    
            tip_percent = int(input())
    
            tax_percent = int(input())
    
            tip = (meal_cost * tip_percent) / 100
            tax = (meal_cost * tax_percent) / 100
            totalCost = int(round(meal_cost + tip + tax))
            print(totalCost)
    
    
        solve(meal_cost, tip_percent, tax_percent)
    

    I'm having some problem with this. It just keeps showing me wrong answer.

    Mind I add that when I switch the default code from C++ to Python 3 it shown me that the f __name__ == '__main__': doesn't have an indent. After I add it, I still get wrong answer.

    Please Help