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
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
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
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
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
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
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
> 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
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
9 matches
Mail list logo