When you go out to eat, you always tip 20% of the bill amount. But who’s got the time to calculate the right tip amount every time? Not you that’s for sure! You’re making a program to calculate tips and save some time.
Your program needs to take the bill amount as input and output the tip as a float.
Sample Input
50
Sample Output
10.0
Answers
Answered by
2
Answer:
def tip(initial_amount):
return (0.2 ÷ initial_amount)
Explanation:
20% of x =(20% ÷x) = ((20/100)÷x)
Similar questions
Science,
1 month ago
Political Science,
3 months ago
English,
3 months ago
English,
10 months ago
Science,
10 months ago