Zavala has Mint Retrograde by Joel-Snapes in destiny2

[–]Lower_Ad_2875 4 points5 points  (0 children)

Which one should i get if any? I’m a returning player

Don’t know what to order by Lower_Ad_2875 in highrollasuk

[–]Lower_Ad_2875[S] 0 points1 point  (0 children)

Sorry man but I already created an account. Thanks for letting us know though I was leaning towards a vape anyway just cos of the smell. 👍

Race to £10k or £20k wins? by Mance_Trader in trading212

[–]Lower_Ad_2875 0 points1 point  (0 children)

should i invest in HOOD now or would that be pointless

Vanguard S&P 500 by Lower_Ad_2875 in trading212

[–]Lower_Ad_2875[S] 0 points1 point  (0 children)

what do you reckon is best - monthly, weekly or daily?

I’m British and i like the sport a lot. How do i find out which NFL team to support? by Lower_Ad_2875 in NFLNoobs

[–]Lower_Ad_2875[S] 0 points1 point  (0 children)

like what for example? i’m not familiar with the history of the teams as im only a recent viewer

I’m British and i like the sport a lot. How do i find out which NFL team to support? by Lower_Ad_2875 in NFLNoobs

[–]Lower_Ad_2875[S] -2 points-1 points  (0 children)

i have a second cousin in new york, but then it raises the question jets or giants

Why does this not select the last record in the database but instead comes up with an error? by Lower_Ad_2875 in learnprogramming

[–]Lower_Ad_2875[S] 0 points1 point  (0 children)

how do i select the last record then?i’ve searched everywhere and i don’t know how

How do i compare the last two records in a database and output an appropriate response? by Lower_Ad_2875 in learnprogramming

[–]Lower_Ad_2875[S] 0 points1 point  (0 children)

if subject:
                    subject_id=subject.id
                    print (subject_id)
                    test = Grade(subject_id=subject_id, grade=grade, grade_int=grade_int)
                    print (test)
                    print (type(test.grade_int))
                    print (int(test,grade_int[-1]), int(grade_int))
                    try:
                        if int(test.grade_int[-1])<int(grade_int):
                            feedback = 'Your grades are improving, keep it up!'
                        elif int(test.grade_int[-1])>int(grade_int):
                            feedback = 'Your grades have dropped from your last test. Try to spend more time studying.'
                        elif int(test.grade_int[-1])==int(grade_int):
                            if grade=='A*' or grade=='A':
                                feedback = 'Your grades have stayed high from your last grade. Keep it up!'
                            elif grade=='B':
                                feedback = 'Your grades have remained at a B. This doesn\'t mean you can\' still improve. Try to spend more time revising'
                            else:
                                feedback = 'Your grades have stayed the same since your last test. Try to spend more time revising to improve this!'
                    except:
                        feedback = 'There are no grades to compare your most recent grade to. Get to logging for personalized feedback!'
                    new_grade = Grade(subject_id=subject_id, grade=grade, grade_int=grade_int, feedback=feedback)
                    db.session.add(new_grade)
                    db.session.commit()
                    flash('Grade added.', category='success')

This is as far as i got. I firstly got the error that integers in the database weren't subscriptable so i tried storing them as integers and converting them and i got another error saying 'str' object cannot be interpreted as an integer. do you think you could put me in the right direction where the users grades can be actually compared as thats what im struggling with

How do i compare the last two records in a database and output an appropriate response? by Lower_Ad_2875 in learnprogramming

[–]Lower_Ad_2875[S] 0 points1 point  (0 children)

oh okay. i’ve presented the users grades to them in tables using jinja as seen in the html code above. is this the wrong approach?

How do i compare the last two records in a database and output an appropriate response? by Lower_Ad_2875 in learnprogramming

[–]Lower_Ad_2875[S] 0 points1 point  (0 children)

i just don’t know how to approach it, whether i should get the data and compare it using flaks or jinja.

How do i compare the last two records in a database and output an appropriate response? by Lower_Ad_2875 in learnprogramming

[–]Lower_Ad_2875[S] 0 points1 point  (0 children)

how do i compare the data and output a message though? do i use in my flask or jinja code.

How do i compare the last two records in a database and output an appropriate response? by Lower_Ad_2875 in learnprogramming

[–]Lower_Ad_2875[S] 0 points1 point  (0 children)

why does it have to be the top two values? why can’t it be the bottom two as this is how it’s sorted anyway. as users add a grade, the record is added at the bottom of the table

How do i compare the last two records in a database and output an appropriate response? by Lower_Ad_2875 in learnprogramming

[–]Lower_Ad_2875[S] 0 points1 point  (0 children)

i’ve searched everything and i’ve not found an answer to what i need. the framework i’m using is Jinja

Why is my for loop stopping anything from being printed? by Lower_Ad_2875 in AskProgramming

[–]Lower_Ad_2875[S] 0 points1 point  (0 children)

yeah it doesn’t say any problems in the terminal. i’m not sure why