New course! Every coder should learn Generative AI!
Try a free lesson+ 3
rishabh
Calculate 20% of Bill and print result
print (20 * Bill / 100)
+ 1
Show us what have you done about this, or explain your problem
+ 1
Simple math problem just implement it in python. Also show your attempt.
+ 1
Thanku Aj-soloHelper and Michal it worked.
+ 1
rishabh Your question appears to a duplicate please use the searchbar before asking.
Please use the forum guidelines provided below and use the 8 rules for getting help from the community.
https://www.sololearn.com/Blog/38/8-simple-rules-to-get-help-from-the-community
Your question will be marked for deletion.
Reason duplicate threads are removed to:
Focus substantially similar discussion in one thread and to prevent forums being cluttered with multiple threads on the same topic.
https://www.sololearn.com/Discuss/1316935/?ref=app
https://www.sololearn.com/discuss/2828777/?ref=app
https://www.sololearn.com/discuss/2709597/?ref=app
https://www.sololearn.com/discuss/2730527/?ref=app
https://www.sololearn.com/discuss/2738734/?ref=app
https://www.sololearn.com/discuss/2742307/?ref=app
https://www.sololearn.com/discuss/2776833/?ref=app
https://www.sololearn.com/discuss/2809685/?ref=app
https://www.sololearn.com/discuss/2860116/?ref=app
0
I have tried the input function
1.
Bill= int(input(50))
X= Bill * 20
Tip= x/100
Print(tip)
2.
Bill=int(input(50))
Tip=Bill *20
Print(Tip /100)
3.
Bill=int(input(50))
Print((Bill*20) /100)
I have tried all these
0
rishabh you should sent no argument to your input() function
0
I have also tried it..
Do you mean like
Bill=int(input())
Then what should I do next?
0
Idk, maybe you used to write "Print()", which starts with uppercase. Python is case sensitive, so print() and Print() may be two completly different things. Check your syntax
- 4
Dis=bill%20
Ans=float(Dis)
Print(Ans)