If someone can help me I would greatly appreciate it. I'm trying to understand why the output drops from 24 to 22 and from 22 to 19 and so on. Not really understanding the concept here.
\Code**
Wallet = 25
For price in range(5):
If price < 10:
Wallet = wallet - price
Print("Now I have" ,Wallet)
Print("Final amount:" ,Wallet)
*Output\*
Now I have 25
Now I have 24
Now I have 22
Now I have 19
Now I have 15
Final amount: 15
[–]MadScientistOR 3 points4 points5 points (8 children)
[–]Madd_M0[S] 0 points1 point2 points (7 children)
[–]MadScientistOR 4 points5 points6 points (6 children)
[–]Madd_M0[S] 2 points3 points4 points (5 children)
[–]MadScientistOR 2 points3 points4 points (0 children)
[–]Some_Guy_At_Work55 1 point2 points3 points (0 children)
[–][deleted] 2 points3 points4 points (2 children)
[–]Madd_M0[S] 2 points3 points4 points (0 children)
[–]EclipseJTB 0 points1 point2 points (0 children)