From a9c4aab85fb9b8edce53212548f8d0c285832dc4 Mon Sep 17 00:00:00 2001
From: mahesh
Date: Fri, 18 Aug 2017 02:12:37 +0530
Subject: Adds tags in yaml files
---
yaksh/demo_templates/yaml_question_template | 399 ++++++++++++++++++----------
1 file changed, 252 insertions(+), 147 deletions(-)
(limited to 'yaksh/demo_templates')
diff --git a/yaksh/demo_templates/yaml_question_template b/yaksh/demo_templates/yaml_question_template
index 065072c..1309c06 100644
--- a/yaksh/demo_templates/yaml_question_template
+++ b/yaksh/demo_templates/yaml_question_template
@@ -1,15 +1,26 @@
---
-active: true # question status = true or false
+testcase:
+- test_case_type: |-
+ integertestcase
+ correct: 2
+- test_case_type: |-
+ integertestcase
+ correct: -3
+files: []
language: |- # bash, scilab, python, c/c++, java
- python
+ python
partial_grading: false
+tags:
+- python
+- quadratic
+- demo
+- integer
+points: 1.0
snippet: ''
-summary: |-
- Roots of quadratic equation
+active: true
type: |-
integer
-grade_assignment_upload: false
-description: |- # Entire question description.
+description: |-
Type in the box below, one of the roots to the following quadratic equation?
-points: 1.0
+summary: |-
+ Roots of quadratic equation
+grade_assignment_upload: false
+---
testcase:
- test_case_type: |-
- integertestcase
- correct: 2
-- test_case_type: |-
- integertestcase
- correct: -3
+ stringtestcase
+ correct: |-
+ (2, 'HelloHello', ':', 'Bye')
+ string_check: |- # exact or lower
+ exact
files: []
----
-active: true
language: |-
python
partial_grading: false
+tags:
+- python
+- demo
+- print
+- string
+- '1'
+- case_sensitive
+- casesensitive
+- python2
+points: 1.0
snippet: ''
-summary: |-
- Print Output
+active: true
type: |-
string
-grade_assignment_upload: false
description: |-
What is the output for the following code in Python 2.x:
print(2, "Hello"*2, ":" ,"Bye")
-points: 1.0
+summary: |-
+ Print Output
+grade_assignment_upload: false
+---
testcase:
-- string_check: |- #exact or lower
- exact
- test_case_type: |-
- stringtestcase
- correct: |-
- (2, 'HelloHello', ':', 'Bye')
+- test_case_type: |-
+ floattestcase
+ correct: 5.5786
+ error_margin: 0.0
files: []
----
-active: true
language: |-
python
partial_grading: false
+tags:
+- float
+- '1'
+- python
+- decimal
+- demo
+points: 1.0
snippet: ''
-summary: |-
- Adding decimals
+active: true
type: |-
float
-grade_assignment_upload: false
description: |-
Write down the resultant value of the following -
3.4566+2.122
is_palindrome(arg)
which will take one string argument.
- is_palindrome("Hello")
should return False
is_palindrome(arg)
which will take one string argument.
- Input: - box - Output - b - o - x --points: 1.0 + Return True if the argument is palindrome & False otherwise. +
is_palindrome("Hello")
should return False
- Note: You do not have to print anything, neither you have to make the function call. - Just define the function to perform the required operation, return the output & click on check answer. - Also, note that the function name should exactly be as mentioned above. + Input: + box + Output + b + o + x-points: 2.0 +summary: |- + For Loop over String +grade_assignment_upload: false +--- testcase: -- test_case: |- +- test_case_type: |- + standardtestcase + test_case_args: '' + test_case: |- #include
new.txt
which contains the string Hello, World!
in it.
-points: 1.0
+ Write a program to add 3 numbers.
+ + Note: You do not have to print anything, neither you have to make the function call. + Just define the function to perform the required operation, return the output & click on check answer. + Also, note that the function name should exactly be as mentioned above. ++summary: |- + Add 3 numbers +grade_assignment_upload: false +--- testcase: -- hook_code: |- +- test_case_type: |- + hooktestcase + hook_code: |- def check_answer(user_answer): ''' Evaluates user answer to return - success - Boolean, indicating if code was executed correctly @@ -351,7 +392,71 @@ testcase: except IOError: err = "File new.txt not found." return success, err, mark_fraction - test_case_type: |- - hooktestcase weight: 1.0 files: [] +language: |- + python +partial_grading: false +tags: +- python +- '1' +- file +- hook +- hello +- world +- grade +- assignment +- upload +- demo +points: 1.0 +snippet: '' +active: true +type: |- + upload +description: |- + Upload a file called
new.txt
which contains the string Hello, World!
in it.
+summary: |-
+ Hello World in File
+grade_assignment_upload: true
+---
+testcase:
+- test_case_type: |-
+ mcqtestcase
+ correct: false
+ options: |-
+ s.reverse()
+- test_case_type: |-
+ mcqtestcase
+ correct: true
+ options: |-
+ s[::-1]
+- test_case_type: |-
+ mcqtestcase
+ correct: false
+ options: |-
+ reversed(s)
+- test_case_type: |-
+ mcqtestcase
+ correct: true
+ options: |-
+ "''.join(reversed(s))
+files: []
+language: |-
+ python
+partial_grading: false
+tags:
+- python
+- '2'
+- reverse
+- mcc
+- demo
+points: 2.0
+snippet: ''
+active: true
+type: |-
+ mcc
+description: |-
+ Which of the following options would reverse the string?
+summary: |-
+ Reverse a string
+grade_assignment_upload: false
--
cgit