diff options
author | Prabhu Ramachandran | 2015-05-27 10:58:44 +0530 |
---|---|---|
committer | Prabhu Ramachandran | 2015-05-27 10:58:44 +0530 |
commit | a83b57aee80959f11f96ad6a3a738c9fac906e26 (patch) | |
tree | f14a18f7e821d87b098a93610ece8772d568563b /testapp/docs/sample_questions.xml | |
parent | a022e0145ec8fb1622d58c2e2281c016b1d45b01 (diff) | |
parent | 92150265c82f3d1f6e4eb382447ae8e448cd406f (diff) | |
download | online_test-a83b57aee80959f11f96ad6a3a738c9fac906e26.tar.gz online_test-a83b57aee80959f11f96ad6a3a738c9fac906e26.tar.bz2 online_test-a83b57aee80959f11f96ad6a3a738c9fac906e26.zip |
Merge pull request #48 from ankitjavalkar/add-docs
Re apply docs directory in testapp directory and other changes
Diffstat (limited to 'testapp/docs/sample_questions.xml')
-rw-r--r-- | testapp/docs/sample_questions.xml | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/testapp/docs/sample_questions.xml b/testapp/docs/sample_questions.xml new file mode 100644 index 0000000..53c76f8 --- /dev/null +++ b/testapp/docs/sample_questions.xml @@ -0,0 +1,43 @@ +<question_bank> + +<question> +<summary> +Factorial +</summary> +<description> +Write a function called "fact" which takes a single integer argument (say "n") +and returns the factorial of the number. +For example fact(3) -> 6 +</description> +<points>2</points> +<type>python</type> +<test> +assert fact(0) == 1 +assert fact(5) == 120 +</test> +<options> +</options> +</question> + +<question> +<summary> +Simple function +</summary> +<description> +Create a simple function called "sqr" which takes a single argument and +returns the square of the argument +For example sqr(3) -> 9. +</description> +<points>1</points> +<type>python</type> +<test> +import math +assert sqr(3) == 9 +assert abs(sqr(math.sqrt(2)) - 2.0) < 1e-14 +</test> +<options> +</options> +</question> + + +</question_bank> |