hello could someone please help me how to make the recurring effect in this problem? i am trying to make the loop do the same thing for each month, but with a different outstanding amount. it is ocw scholar course 6.00 pset1 (im using python btw)
here is what i have so far
The first problem that you have is that you're mixing Python2 with Python3. Python2 uses raw_input and print isn't function syntax. Python3 is the opposite. Second, your range should be 0, 12. When you start at 0, you want to end at 11 to get 12 iterations. You may also want to look at xrange. The difference in small loops isn't radical, but in large loops it can be. Stylewise, your variable names should be more descriptive of what they are. oustanding_amt is never assigned a new value inside the loop, so it always has the original amount entered instead of the new amount for each iteration. You'll also want to look into the math module for rounding and probably formatted printing.
Join our real-time social learning platform and learn together with your friends!