[web2py] Re: Failing calculate the average

2017-11-15 Thread mostwanted
U were right man, i calculated my average right below the {{pass}} and now it is able to increment and do the average of course i changed the variables to total and average. Thanks alot Tony On Wednesday, November 15, 2017 at 5:36:19 PM UTC+2, Anthony wrote: > > {{ >> average=0for report in for

[web2py] Re: Failing calculate the average

2017-11-15 Thread Anthony
> > {{ > average=0for report in form: > perc=(float(report.marks)/float(report.total))*float(100)if perc>=75: > grade='A'elif perc>=65: > grade='B'elif perc>=55: > grade='C'elif perc>=45: > grade='D' > > This is where I'm attempting to calculate the average > > average+=perc > average2=int(averag