0

homework help please?

Change in Salary A common misconception is that if you receive three successive 5% pay raises, then your original salary will have increased by 15%. Request a salary as input and then display the salary after receiving three successive 5% pay raises. The program also should display the percentage change in salary. I know how to create the inputs, i just dont know how to do the evaluation part

11th Jul 2018, 4:58 PM
Eimaj Namkeirab
Eimaj Namkeirab - avatar
3 Antworten
+ 4
You should realy try it yourself first. https://code.sololearn.com/ca7A052rt6pY/?ref=app
11th Jul 2018, 6:41 PM
Louis
Louis - avatar
0
Create a loop or recursive function that returns the pay + pay*0.05 each time. I'm not familiar enough with Python, so here's an example in JavaScript. Try to understand it before using it. The homework only gets harder if you don't. function raise(pay, n){ if(n==0) return pay; else return raise(pay + pay*0.05, --n); }
11th Jul 2018, 6:49 PM
naomi
naomi - avatar
0
I will try it. I’m interested in learning and not just completing it. Thank you very much!
11th Jul 2018, 6:52 PM
Eimaj Namkeirab
Eimaj Namkeirab - avatar