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.
#!/bin/python3importmathimportosimportrandomimportreimportsys# Complete the solve function below.defsolve(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)/100tax=(meal_cost*tax_percent)/100totalCost=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.
Day 2: Operators
You are viewing a single comment's thread. Return to all comments →
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