Answer the below | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 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)

5th Feb 2021, 2:01 PM
mOnika
mOnika - avatar
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 😃
6th Feb 2021, 7:31 AM
∆BH∆Y
∆BH∆Y - avatar
+ 5
Show is your attempt please.
5th Feb 2021, 2:04 PM
K.S.S. Karunarathne
K.S.S. Karunarathne - avatar
+ 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?
2nd Jun 2021, 2:18 AM
Muhammad Khan
Muhammad Khan - avatar
0
TRY THIS bill = int(input()) print(float((bill / 100) * 20)) #your code goes here
5th Feb 2021, 2:15 PM
K.S.S. Karunarathne
K.S.S. Karunarathne - avatar
0
U need to do casting change it with float .
5th Feb 2021, 2:57 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
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
5th Feb 2021, 3:40 PM
∆BH∆Y
∆BH∆Y - avatar
0
∆BH∆Y I didn't get the answer yet
6th Feb 2021, 7:21 AM
mOnika
mOnika - avatar