- 1
Anyone willing to help understand the 'Tip' code, one the 6 projects in Python for beginners? Pleas
It's confusing
8 Antworten
+ 3
Don't expect people to put effort into helping you if you're not even willing to put any effort into asking your question.
https://www.sololearn.com/Content-Creation-Guidelines?
https://code.sololearn.com/Wv5gTHy1N6Ji/?ref=app
https://www.sololearn.com/discuss/1316935/?ref=app
https://code.sololearn.com/W3uiji9X28C1/?ref=app
https://www.sololearn.com/discuss/333866/?ref=app
0
Since we are given a percentage we have to first start by turning it into a decimal. This is done by dividing the percentage by 100.
Examples:
50/100 = 0.5
25/100 = 0.25
Since you need to calculate a tip of 20%, you would then multiply this decimal by 20.
Examples:
50/100*20 = 10
25/100*20 = 5
You could also just multiply it by the decimal version of 20%
0
That's not how this is supposed to work.
0
It's OK.. Then make me understand the 25
0
The 25 was used as an example
0
Ok
0
Lemmi try it
- 2
Thanks.Do you mind writing the code for me?