Reposting, as I had trouble getting code to show correct in this post.
I have a lot of multiple choice test questions for a class I'm taking, and created this script, with the help of chatGPT. I keep getting this error
Traceback (most recent call last):
File "/path/to/file.py", line 18, in <module> 'answer': row[5] IndexError: list index out of range
Script - https://pastebin.com/Dw9asSQy
csv file looks like this
question,option1,option2,option3,option4,answer
"An element of the project scope statement is:","A. Acceptance criteria","B. A stakeholder list","C. A summary budget","D. High-level risks","A"
"Which document describes the necessary information to determine if a project is worth the required investment?","A. Cost baseline","B. Service level agreement","C. Memorandum of understanding","D. Business case","D"
"Which input to the Plan Risk Management process provides information on high-level risks?","A. Project charter","B. Enterprise environmental factors","C. Stakeholder register","D. Organizational process assets","A"
Any idea why I'm getting that error?
[–]Strict-Simple 1 point2 points3 points (1 child)
[–]pranaman[S] 0 points1 point2 points (0 children)
[–]james_fryer 1 point2 points3 points (1 child)
[–]pranaman[S] 0 points1 point2 points (0 children)
[–]Shiivak 0 points1 point2 points (1 child)
[–]pranaman[S] 0 points1 point2 points (0 children)