Mar-16-2021, 04:36 PM
def sayısal(Vs, Vi): return Vs - Vi def artış(x, r): y = x*((r/100)+1) return y h = 1 a = float(input('Number of cases: ')) b = float(input('Percentage increase: ')) c = sayısal(artış(a, b), a) while a < 30001: print(f'{h}) {a} \n +({c})') a = artış(a, b) h += 1 c = sayısal(artış(a, b), a)I wrote this code and it's working but I wanna ask something. Its output is:
1) 10000 (+2500)
2) 12500 (+3125)
3) 15625 (+3096)
...
But ı want like that (for same value):
1) 10000
2) 12500 (+2500)
3) 15625 (+3125)
...
How can I solve that?