Faculty of Engineering and Mathematical Sciences 
Not logged in (login)

help3403


This forum is provided to promote discussion amongst students enrolled in Agile Web Development (CITS3403).
 
Options:
RSS cloud
Jump to:

Why does changing one input break this code segment?

1 of 419 articles shown, currently no other people reading this forum.
photo
From: ANONYMOUS
Date: Fri 22nd May 2020, 3:34am
Actions: 
        Login-to-reply

 

I'm trying to use a link to the quiz page and automatically display the chosen quiz by 
using types and then "int(request.args.get('type'))"  however when I then go to use this 
type to filter the quizes by quizCode, this breaks my code and gives me an index out of 
bounds error. I tried converting the type to an int but it seems to somehow turn itself 
back into a NoneType every-time the code tries to run and I'm not sure why. The code works 
fine if I manually type quizCode='1' for example but when using selectedQuiz it breaks.

Related articles

Why does changing one input break this code segment? (all 5) RSS
├─ THIS   Fri 22nd May 2020, 3:34am, ANONYMOUS
├─ reply 1   Fri 22nd May 2020, 10:06am, Haolin W.
├─ reply 2   Fri 22nd May 2020, 10:15am, ANONYMOUS  O.P.
├─ reply 3   Fri 22nd May 2020, 10:19am, Haolin W.
└─ reply 4   Fri 22nd May 2020, 11:22am, Takoyaki N.
This Page


Program written by: [email protected]
Feedback welcome
Last modified: 11:27am Sep 21 2020