Lesson 3

Leave a comment
Ok so corrected that but still failing. If I test with the report numbers from the hw sheet it comes up the correctly but github is caculating others that don't come out right, not sure why. Anyways have work in 6 hours need to get some shut eye, will try to find time to look tomorrow.

Thanks for your directions 

Sent from my iPhone

> On Sep 15, 2014, at 1:18 AM, Chad Heuschober <notifications@github.com> wrote:
> 
> In task_05.py:
> 
> > +    if int(T) > 20 < 31 and Q == 'yes':
> > +        R = .0466
> > +if int(P) > 1000000:
> > +    if int(T) < 16 and Q == 'yes':
> > +        R = .0205
> > +    if int(T) > 15 < 21 and Q == 'yes':
> > +        R = .0262
> > +
> > +TOTAL = int(round(int(P) * (1 + R / N) ** (N * int(T)), 0))
> > +REPORT = '''Loan Report For: {n}
> > +-----------------------------
> > +    Principal:      {pr} 
> > +    Duration:       {Time}
> > +    Prequalified?:  {q}
> > +    Total:          {total}'''.format(n=NAME, pr=P, Time=T, q=Q, total=TOTAL)
> > +print REPORT
> Couldn't a number be negative? < 200000 also includes -1000000. It's important to learn to gate your code within reasonable boundaries. These sorts of assumptions are the type of common mistake that we try to highlight as part of learning how to think like a programmer. Unless told otherwise, the computer will just keep going.
> 
> —
> Reply to this email directly or view it on GitHub.