quiz/management/commands/seed_db.py
changeset 22 fe197c0c9903
parent 15 99af908a4174
child 29 ea1c0110e989
equal deleted inserted replaced
21:ff6d34fc7137 22:fe197c0c9903
    15     ev.save()
    15     ev.save()
    16 
    16 
    17     q1 = QuestionBank()
    17     q1 = QuestionBank()
    18     q1.quiz_num = "11"
    18     q1.quiz_num = "11"
    19     q1.description = "How do you combine two lists a and b"
    19     q1.description = "How do you combine two lists a and b"
    20     q1.type = 'S'
       
    21     q1.time_limit = 15
    20     q1.time_limit = 15
    22     q1.expected_ans = r"a + b"
    21     q1.expected_ans = r"a + b"
    23     q1.save()
    22     q1.save()
    24 
    23 
    25     q2 = QuestionBank()
    24     q2 = QuestionBank()
    26     q2.quiz_num = '11'
    25     q2.quiz_num = '11'
    27     q2.description = "What IPython magic command would you use to obtain the code that you have already typed."
    26     q2.description = "What IPython magic command would you use to obtain the code that you have already typed."
    28     q2.type = "S"
       
    29     q2.time_limit = 15
    27     q2.time_limit = 15
    30     q2.expected_ans = r"%hist"
    28     q2.expected_ans = r"%hist"
    31     q2.save()
    29     q2.save()
    32 
    30 
    33     q3 = QuestionBank()
    31     q3 = QuestionBank()
    34     q3.quiz_num = "11"
    32     q3.quiz_num = "11"
    35     q3.description = "a = [1, 2, 5, 9]. How do you add 10 to end of this list."
    33     q3.description = "a = [1, 2, 5, 9]. How do you add 10 to end of this list."
    36     q3.type = "S"
       
    37     q3.time_limit = 30
    34     q3.time_limit = 30
    38     q3.expected_ans = r"a.append(10)"
    35     q3.expected_ans = r"a.append(10)"
    39     q3.save()
    36     q3.save()
    40 
    37 
    41     
    38