Anyone willing to help understand the 'Tip' code, one the 6 projects in Python for beginners? Pleas | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
- 1

Anyone willing to help understand the 'Tip' code, one the 6 projects in Python for beginners? Pleas

It's confusing

11th Oct 2021, 9:56 PM
Billy
Billy - avatar
8 Antworten
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%
11th Oct 2021, 10:13 PM
Madi
Madi - avatar
0
That's not how this is supposed to work.
11th Oct 2021, 10:16 PM
Simon Sauter
Simon Sauter - avatar
0
It's OK.. Then make me understand the 25
11th Oct 2021, 10:19 PM
Billy
Billy - avatar
0
The 25 was used as an example
11th Oct 2021, 10:21 PM
Madi
Madi - avatar
0
Ok
11th Oct 2021, 10:23 PM
Billy
Billy - avatar
0
Lemmi try it
11th Oct 2021, 10:26 PM
Billy
Billy - avatar
- 2
Thanks.Do you mind writing the code for me?
11th Oct 2021, 10:16 PM
Billy
Billy - avatar