Lowest price ever! Learn Generative AI for 48% less!
Get my discount- 1
Answer the below
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 Attempt:- Bill=int(input (50*20/100) Print(bill)
7 Answers
+ 2
Monika Khandelwal See, in your code mistakes are there like:
1. In the first line your input statement is not blank, like!!
Bill = int(input ())
2. Your formula to calculate the tip is wrong according to python programming, see my line:
Percent = (Bill*20)/100
3. Your print statement is wrong, remember python is a case sensitive language Print is not same as print.
See my code line:
print(percent)
One more tip: You should name your variables in lowercase letters, it will help 😃
Hope this helps
Happy Coding 😃
+ 5
Show is your attempt please.
+ 1
bill = int(input())
bill = 125
tips = (bill*20)/100
print(tips)
i solve the first test and then enter the value of the second test in the above code, the first test got wrong. Don't know what to do?
0
TRY THIS
bill = int(input())
print(float((bill / 100) * 20))
#your code goes here
0
U need to do casting change it with float .
0
bill = int(input())
percent = (bill * 20)/100
print (percent )
#your code
# Don't copy the code, instead take idea and compare it with your code that what mistake you made
0
∆BH∆Y I didn't get the answer yet