Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python beginner
#11
(Jun-24-2018, 05:30 PM)gontajones Wrote: I completely agree with you. But maybe a beginner would read this and ask why the 'month' ('m' in my case) variable exists.

    for month in range(months):         # count once for each month
        borrowed *= 1 + interest / 12   # & compound the interest
        borrowed -= repayment           # & subtract repayment
    print(borrowed)                     # then, print the remaining amount borrowed
Big Grin I like that we are in agreement
If you add some comments it should be clear for all. I tutor online and I've found most students are sorely lacking commenting skills.
Reply


Messages In This Thread
Python beginner - by BigDisAok - Jun-23-2018, 11:18 AM
RE: Python beginner - by Nwb - Jun-23-2018, 11:57 AM
RE: Python beginner - by BigDisAok - Jun-23-2018, 12:23 PM
RE: Python beginner - by gontajones - Jun-23-2018, 01:08 PM
RE: Python beginner - by BigDisAok - Jun-23-2018, 01:12 PM
RE: Python beginner - by gontajones - Jun-23-2018, 01:21 PM
RE: Python beginner - by Grok_It - Jun-24-2018, 04:55 PM
RE: Python beginner - by gontajones - Jun-24-2018, 05:08 PM
RE: Python beginner - by Grok_It - Jun-24-2018, 05:27 PM
RE: Python beginner - by gontajones - Jun-24-2018, 05:30 PM
RE: Python beginner - by Grok_It - Jun-24-2018, 05:37 PM
RE: Python beginner - by BigDisAok - Jun-25-2018, 09:01 AM
RE: Python beginner - by buran - Jun-25-2018, 10:18 AM
RE: Python beginner - by Grok_It - Jun-25-2018, 06:36 PM
RE: Python beginner - by buran - Jun-25-2018, 06:41 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020