[web2py] Re: Getting wrong Results with my grading system

2017-11-19 Thread mostwanted
WOOOW!!! Thank you Jose i have been switching the signs, i have been using *> *as small than and *< *as greater than,i do not know when all this information got mixed up in my head but it took your words to pay close attention & realize my error. Thank you. *And honestly its not an assignment

[web2py] Re: Getting wrong Results with my grading system

2017-11-19 Thread Jose C
This is starting to look like a homework assignment. You do not seem to understand what the >= (greater than or equal to) means. The python statement: if perc >=100: grade='A' elif perc >= 79: grade='B' ... means or reads as (in English): if the value in 'perc' is greater than or equal to 10

[web2py] Re: Getting wrong Results with my grading system

2017-11-19 Thread 黄祥
think the answer is right in front of you (just a matter of conditional logic): What i want is to reflect an a 'A' if a student gets anything between 100% and 80%, hence the line if perc>=100: grade='A' *pls try (not tested):* if perc>=80 and perc<=100: grade='A' and get grade 'B' if a student ge

[web2py] Re: Getting wrong Results with my grading system

2017-11-18 Thread mostwanted
What i want is to reflect an a 'A' if a student gets anything between 100% and 80%, hence the line if perc>=100: grade='A' and get grade 'B' if a student gets anything between79% and 70% hence the line elif perc>=79: grade='B' elif perc>=69: grade='C' When i

[web2py] Re: Getting wrong Results with my grading system

2017-11-18 Thread Anthony
On Saturday, November 18, 2017 at 9:15:36 AM UTC-5, mostwanted wrote: > > I want grade 'A' to fall within a range of percentages, 'A' ranges from > 80%(being the lowest) to 100%(being the highest), how do i reflect that > here to get the system to grade properly?? > if perc >= 80: The upper r

[web2py] Re: Getting wrong Results with my grading system

2017-11-18 Thread mostwanted
Thanks for the {{pass}} clarification, its clear now On Saturday, November 18, 2017 at 2:38:28 PM UTC+2, Anthony wrote: > > > And I'd also be grateful if someone just simple explained what {{pass}} >> does in web2py and where do we place it because i find myself placing it in >> wrong places and

[web2py] Re: Getting wrong Results with my grading system

2017-11-18 Thread mostwanted
I want grade 'A' to fall within a range of percentages, 'A' ranges from 80%(being the lowest) to 100%(being the highest), how do i reflect that here to get the system to grade properly?? On Saturday, November 18, 2017 at 11:05:02 AM UTC+2, Jose C wrote: > > Simple logic error... > > Your first i

[web2py] Re: Getting wrong Results with my grading system

2017-11-18 Thread Anthony
> And I'd also be grateful if someone just simple explained what {{pass}} > does in web2py and where do we place it because i find myself placing it in > wrong places and at times it just disrupts the balance of the entire code > if i don't place it correctly, that'd mean a lot, thanks. > The

[web2py] Re: Getting wrong Results with my grading system

2017-11-18 Thread Jose C
Simple logic error... Your first if clause should most likely be: if perc >= 90: in order to trap that value. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Iss