# HG changeset patch # User nishanth # Date 1277791684 -19800 # Node ID 0b57494e8b4e3e7a3c3f0ee362c87c60ee4b7031 # Parent 672409e18e16fb5317c0b05faf349d01da9409ab added the field topic to each question in xml file diff -r 672409e18e16 -r 0b57494e8b4e question_bank.xml --- a/question_bank.xml Tue Jun 29 11:23:10 2010 +0530 +++ b/question_bank.xml Tue Jun 29 11:38:04 2010 +0530 @@ -1,6 +1,7 @@ +Plotting Describe the plot produced by the following code @@ -17,6 +18,7 @@ +Plotting What ipython magic command do you use to obtain the lines of code you have already typed in the interpreter? What command do you use to save them? @@ -29,6 +31,7 @@ +Plotting How do you set the x and y labels of a plot to "x" and "sin(x)" ? @@ -44,6 +47,7 @@ +Plotting How will you set the x and y axis limits so that the region of interest is in the rectangle (0, -1.5) and (2 pi, 1.5)? @@ -56,6 +60,7 @@ +Lists and Files How do you combine two lists a and b to produce one list? @@ -68,6 +73,7 @@ +Lists and Files If a = [1, 2, 5, 9] how do you add 10 to the end of this list ? @@ -82,6 +88,7 @@ +Lists and Files Write the code to read a file "data.txt" and print each line of it? @@ -94,6 +101,7 @@ +For Loops The following code snippet has an error/bug. What is the error? @@ -115,6 +123,7 @@ +Strings "Rossum, Guido, 42, 56, 34, 54" is a sample line from a Comma Separated Values (CSV) file What code would you use to separate the line into fields? @@ -129,6 +138,7 @@ +Lists and Files If a = [1, 2, 5, 9] how do you find the length of this list? @@ -141,6 +151,7 @@ +Dictionaries and Piecharts What is the output of the following code snippet @@ -161,6 +172,7 @@ +Dictionaries and Piecharts Given the below dictionary, what command will you give to plot a pie-chart? @@ -177,6 +189,7 @@ +Statistics Given the below marks, how will you calculate the mean? @@ -193,6 +206,7 @@ +Arrays and Matrices How will you convert the list marks to an array? @@ -208,6 +222,7 @@ +Arrays and Matrices What is the value of a after executing this code. @@ -225,6 +240,7 @@ +Arrays and Matrices What will be printed? @@ -246,6 +262,7 @@ +Arrays and Matrices If x = array([[1,2,3,4]]) How to change x to array([[1,2,0,4]]) ? @@ -258,6 +275,7 @@ +Arrays and Matrices x = array([[1,2,3,4], @@ -280,6 +298,7 @@ +Arrays and Matrices What is the output of x[::3,::3] @@ -297,6 +316,7 @@ +Arrays and Matrices How do you get the transpose of this array? @@ -313,6 +333,7 @@ +Arrays and Matrices What does this produce? @@ -333,6 +354,7 @@ +Arrays and Matrices What command do you use to find the inverse of a matrix and its eigenvalues? @@ -345,6 +367,7 @@ +Solving linear equations Given a 4x4 matrix A and a 4-vector b , what command do you use to solve for the equation Ax = b ? @@ -357,6 +380,7 @@ +Finding roots How do you calculate the roots of the polynomial, y = 1 + 6*x + 8*x^2 + x^3 @@ -369,6 +393,7 @@ +Solving linear equations Two arrays a and b are numerically almost equal, what command do you use to check if this is true? @@ -382,6 +407,7 @@ +Basic Datatypes What is the largest integer value that can be represented by Python? @@ -400,6 +426,7 @@ +Basic Datatypes What is the result of 17.0 / 2? @@ -412,6 +439,7 @@ +Basic Datatypes Which of the following is not a type in Python? @@ -431,6 +459,7 @@ +Basic Datatypes How do you create a complex number with real part 2 and imaginary part 0.5 ? @@ -444,6 +473,7 @@ +Input and Output What is the difference between print x and print x, @@ -456,6 +486,7 @@ +Input and Output What does 't' * 40 produce? @@ -474,6 +505,7 @@ +Basic Datatypes What is the output? @@ -490,6 +522,7 @@ +Basic Datatypes What is the output? @@ -505,6 +538,7 @@ +Lists and Tuples How do you find the presence of an element x in the list a @@ -517,6 +551,7 @@ +Sets What is the output @@ -533,6 +568,7 @@ +Dictionaries What is the output @@ -553,6 +589,7 @@ +Lists and Tuples What is the value of a after executing this code. @@ -569,6 +606,7 @@ +Lists and Tuples What is the output? @@ -587,6 +625,7 @@ +Functions What is the value of func(1), if @@ -603,6 +642,7 @@ +Functions How many items can a function return ? diff -r 672409e18e16 -r 0b57494e8b4e quiz/models.py --- a/quiz/models.py Tue Jun 29 11:23:10 2010 +0530 +++ b/quiz/models.py Tue Jun 29 11:38:04 2010 +0530 @@ -5,12 +5,13 @@ TOPIC_CHOICES = (("11", "Plotting"), ("12", "Lists and Files"), - ("13", "Strings"), - ("14", "Dictionaries and Piecharts"), - ("15", "Statistics"), - ("16", "Matrices"), - ("17", "Solving linear equations"), - ("18", "Finding roots"), + ("13", "For Loops"), + ("14", "Strings"), + ("15", "Dictionaries and Piecharts"), + ("16", "Statistics"), + ("17", "Arrays and Matrices"), + ("18", "Solving linear equations"), + ("19", "Finding roots"), ("21", "Basic Datatypes"), ("22", "Input and Output"),