first working version
This commit is contained in:
0
exam_system/data/input/.gitkeep
Normal file
0
exam_system/data/input/.gitkeep
Normal file
297
exam_system/data/input/cpp/2025-10/cpp-easy-v1.json
Normal file
297
exam_system/data/input/cpp/2025-10/cpp-easy-v1.json
Normal file
@@ -0,0 +1,297 @@
|
||||
{
|
||||
"examId": "cpp-easy-v1",
|
||||
"title": "C++ Fundamentals - Easy Level",
|
||||
"subject": "C++",
|
||||
"difficulty": "beginner",
|
||||
"durationMinutes": 40,
|
||||
"passingScore": 70,
|
||||
"sections": [
|
||||
{
|
||||
"id": "basics",
|
||||
"title": "C++ Basics & Syntax",
|
||||
"questions": [
|
||||
{
|
||||
"id": "q1",
|
||||
"type": "single_choice",
|
||||
"prompt": "What is the correct file extension for a C++ source file?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": ".c" },
|
||||
{ "key": "B", "text": ".cpp" },
|
||||
{ "key": "C", "text": ".cxx" },
|
||||
{ "key": "D", "text": "Both B and C are correct" }
|
||||
],
|
||||
"answer": "D",
|
||||
"allowIDK": true,
|
||||
"points": 5
|
||||
},
|
||||
{
|
||||
"id": "q2",
|
||||
"type": "true_false",
|
||||
"prompt": "In C++, every program must have a main() function.",
|
||||
"answer": true,
|
||||
"allowIDK": true,
|
||||
"points": 5
|
||||
},
|
||||
{
|
||||
"id": "q3",
|
||||
"type": "single_choice",
|
||||
"prompt": "Which header file is required to use cout in C++?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "#include <stdio.h>" },
|
||||
{ "key": "B", "text": "#include <iostream>" },
|
||||
{ "key": "C", "text": "#include <conio.h>" },
|
||||
{ "key": "D", "text": "#include <stream>" }
|
||||
],
|
||||
"answer": "B",
|
||||
"allowIDK": true,
|
||||
"points": 5
|
||||
},
|
||||
{
|
||||
"id": "q4",
|
||||
"type": "multiple_choices",
|
||||
"prompt": "Which of the following are valid C++ data types? (Select all that apply)",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "int" },
|
||||
{ "key": "B", "text": "boolean" },
|
||||
{ "key": "C", "text": "float" },
|
||||
{ "key": "D", "text": "char" }
|
||||
],
|
||||
"answer": ["A", "C", "D"],
|
||||
"partialCredit": true,
|
||||
"allowIDK": true,
|
||||
"points": 10
|
||||
},
|
||||
{
|
||||
"id": "q5",
|
||||
"type": "true_false",
|
||||
"prompt": "C++ is case-sensitive, meaning 'Variable' and 'variable' are different identifiers.",
|
||||
"answer": true,
|
||||
"allowIDK": true,
|
||||
"points": 5
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "variables_operators",
|
||||
"title": "Variables & Operators",
|
||||
"questions": [
|
||||
{
|
||||
"id": "q6",
|
||||
"type": "single_choice",
|
||||
"prompt": "Which operator is used to assign a value to a variable in C++?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "==" },
|
||||
{ "key": "B", "text": "=" },
|
||||
{ "key": "C", "text": "===" },
|
||||
{ "key": "D", "text": ":=" }
|
||||
],
|
||||
"answer": "B",
|
||||
"allowIDK": true,
|
||||
"points": 5
|
||||
},
|
||||
{
|
||||
"id": "q7",
|
||||
"type": "multiple_choices",
|
||||
"prompt": "Which of the following are arithmetic operators in C++? (Select all that apply)",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "+" },
|
||||
{ "key": "B", "text": "%" },
|
||||
{ "key": "C", "text": "&&" },
|
||||
{ "key": "D", "text": "*" }
|
||||
],
|
||||
"answer": ["A", "B", "D"],
|
||||
"partialCredit": true,
|
||||
"allowIDK": true,
|
||||
"points": 10
|
||||
},
|
||||
{
|
||||
"id": "q8",
|
||||
"type": "true_false",
|
||||
"prompt": "In C++, you must declare a variable before using it.",
|
||||
"answer": true,
|
||||
"allowIDK": true,
|
||||
"points": 5
|
||||
},
|
||||
{
|
||||
"id": "q9",
|
||||
"type": "single_choice",
|
||||
"prompt": "What is the result of: 10 % 3 in C++?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "3" },
|
||||
{ "key": "B", "text": "1" },
|
||||
{ "key": "C", "text": "3.33" },
|
||||
{ "key": "D", "text": "0" }
|
||||
],
|
||||
"answer": "B",
|
||||
"allowIDK": true,
|
||||
"points": 5
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "control_flow",
|
||||
"title": "Control Flow & Loops",
|
||||
"questions": [
|
||||
{
|
||||
"id": "q10",
|
||||
"type": "single_choice",
|
||||
"prompt": "Which keyword is used for conditional statements in C++?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "when" },
|
||||
{ "key": "B", "text": "if" },
|
||||
{ "key": "C", "text": "check" },
|
||||
{ "key": "D", "text": "condition" }
|
||||
],
|
||||
"answer": "B",
|
||||
"allowIDK": true,
|
||||
"points": 5
|
||||
},
|
||||
{
|
||||
"id": "q11",
|
||||
"type": "true_false",
|
||||
"prompt": "A 'while' loop checks the condition before executing the loop body.",
|
||||
"answer": true,
|
||||
"allowIDK": true,
|
||||
"points": 5
|
||||
},
|
||||
{
|
||||
"id": "q12",
|
||||
"type": "multiple_choices",
|
||||
"prompt": "Which are valid loop types in C++? (Select all that apply)",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "for loop" },
|
||||
{ "key": "B", "text": "while loop" },
|
||||
{ "key": "C", "text": "do-while loop" },
|
||||
{ "key": "D", "text": "repeat-until loop" }
|
||||
],
|
||||
"answer": ["A", "B", "C"],
|
||||
"partialCredit": true,
|
||||
"allowIDK": true,
|
||||
"points": 10
|
||||
},
|
||||
{
|
||||
"id": "q13",
|
||||
"type": "single_choice",
|
||||
"prompt": "What does the 'break' statement do in a loop?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "Skips the current iteration" },
|
||||
{ "key": "B", "text": "Exits the loop completely" },
|
||||
{ "key": "C", "text": "Pauses the loop" },
|
||||
{ "key": "D", "text": "Restarts the loop" }
|
||||
],
|
||||
"answer": "B",
|
||||
"allowIDK": true,
|
||||
"points": 5
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "functions_arrays",
|
||||
"title": "Functions & Arrays",
|
||||
"questions": [
|
||||
{
|
||||
"id": "q14",
|
||||
"type": "true_false",
|
||||
"prompt": "A function in C++ can return only one value.",
|
||||
"answer": true,
|
||||
"allowIDK": true,
|
||||
"points": 5
|
||||
},
|
||||
{
|
||||
"id": "q15",
|
||||
"type": "single_choice",
|
||||
"prompt": "How do you declare a function that doesn't return any value?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "int functionName()" },
|
||||
{ "key": "B", "text": "void functionName()" },
|
||||
{ "key": "C", "text": "null functionName()" },
|
||||
{ "key": "D", "text": "empty functionName()" }
|
||||
],
|
||||
"answer": "B",
|
||||
"allowIDK": true,
|
||||
"points": 5
|
||||
},
|
||||
{
|
||||
"id": "q16",
|
||||
"type": "multiple_choices",
|
||||
"prompt": "Which statements about arrays in C++ are true? (Select all that apply)",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "Array indices start at 0" },
|
||||
{ "key": "B", "text": "Arrays have fixed size once declared" },
|
||||
{ "key": "C", "text": "You can store different data types in the same array" },
|
||||
{ "key": "D", "text": "Arrays are stored in contiguous memory locations" }
|
||||
],
|
||||
"answer": ["A", "B", "D"],
|
||||
"partialCredit": true,
|
||||
"allowIDK": true,
|
||||
"points": 10
|
||||
},
|
||||
{
|
||||
"id": "q17",
|
||||
"type": "single_choice",
|
||||
"prompt": "What is the correct way to declare an integer array of size 5 in C++?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "int arr[5];" },
|
||||
{ "key": "B", "text": "array int arr[5];" },
|
||||
{ "key": "C", "text": "int[5] arr;" },
|
||||
{ "key": "D", "text": "int arr{5};" }
|
||||
],
|
||||
"answer": "A",
|
||||
"allowIDK": true,
|
||||
"points": 5
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "pointers_basics",
|
||||
"title": "Pointers & References Basics",
|
||||
"questions": [
|
||||
{
|
||||
"id": "q18",
|
||||
"type": "true_false",
|
||||
"prompt": "A pointer stores the memory address of another variable.",
|
||||
"answer": true,
|
||||
"allowIDK": true,
|
||||
"points": 5
|
||||
},
|
||||
{
|
||||
"id": "q19",
|
||||
"type": "single_choice",
|
||||
"prompt": "Which operator is used to get the address of a variable?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "*" },
|
||||
{ "key": "B", "text": "&" },
|
||||
{ "key": "C", "text": "@" },
|
||||
{ "key": "D", "text": "#" }
|
||||
],
|
||||
"answer": "B",
|
||||
"allowIDK": true,
|
||||
"points": 5
|
||||
},
|
||||
{
|
||||
"id": "q20",
|
||||
"type": "multiple_choices",
|
||||
"prompt": "Which are true about references in C++? (Select all that apply)",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "References must be initialized when declared" },
|
||||
{ "key": "B", "text": "References can be reassigned to refer to different variables" },
|
||||
{ "key": "C", "text": "References are aliases for existing variables" },
|
||||
{ "key": "D", "text": "References cannot be NULL" }
|
||||
],
|
||||
"answer": ["A", "C", "D"],
|
||||
"partialCredit": true,
|
||||
"allowIDK": true,
|
||||
"points": 10
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"version": "1.0.0",
|
||||
"createdAt": "2025-10-21T12:00:00Z",
|
||||
"createdBy": "system",
|
||||
"tags": ["cpp", "c++", "fundamentals", "beginner", "auto-graded"],
|
||||
"description": "Comprehensive C++ fundamentals exam covering basics, variables, operators, control flow, functions, arrays, and pointer basics."
|
||||
}
|
||||
}
|
||||
|
||||
118
exam_system/data/input/cpp/2025-10/cpp-intermediate-v1.json
Normal file
118
exam_system/data/input/cpp/2025-10/cpp-intermediate-v1.json
Normal file
@@ -0,0 +1,118 @@
|
||||
{
|
||||
"examId": "cpp-intermediate-v1",
|
||||
"title": "C++ Intermediate - OOP & Practical Coding",
|
||||
"subject": "C++",
|
||||
"difficulty": "intermediate",
|
||||
"durationMinutes": 90,
|
||||
"passingScore": 70,
|
||||
"sections": [
|
||||
{
|
||||
"id": "theory",
|
||||
"title": "OOP Theory & Concepts",
|
||||
"questions": [
|
||||
{
|
||||
"id": "q1",
|
||||
"type": "single_choice",
|
||||
"prompt": "In C++, what is the correct way to prevent a derived class from overriding a virtual function?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "Use the 'final' keyword" },
|
||||
{ "key": "B", "text": "Make it private" },
|
||||
{ "key": "C", "text": "Use the 'sealed' keyword" },
|
||||
{ "key": "D", "text": "Remove the virtual keyword" }
|
||||
],
|
||||
"answer": "A",
|
||||
"allowIDK": true,
|
||||
"points": 10
|
||||
},
|
||||
{
|
||||
"id": "q2",
|
||||
"type": "multiple_choices",
|
||||
"prompt": "Which are true about the Rule of Five in modern C++? (Select all that apply)",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "Includes copy constructor" },
|
||||
{ "key": "B", "text": "Includes move constructor" },
|
||||
{ "key": "C", "text": "Includes move assignment operator" },
|
||||
{ "key": "D", "text": "Includes default constructor" }
|
||||
],
|
||||
"answer": ["A", "B", "C"],
|
||||
"partialCredit": true,
|
||||
"allowIDK": true,
|
||||
"points": 15
|
||||
},
|
||||
{
|
||||
"id": "q3",
|
||||
"type": "true_false",
|
||||
"prompt": "In C++, a pure virtual function must be implemented in the base class.",
|
||||
"answer": false,
|
||||
"allowIDK": true,
|
||||
"points": 10
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "coding",
|
||||
"title": "Practical Coding Tasks",
|
||||
"questions": [
|
||||
{
|
||||
"id": "q4",
|
||||
"type": "code_simple",
|
||||
"prompt": "Write a function 'factorial' that computes the factorial of a non-negative integer n recursively. Return the result as an unsigned long long.",
|
||||
"language": "cpp",
|
||||
"tests": [
|
||||
{ "input": "0", "expected": "1", "visibility": "public" },
|
||||
{ "input": "1", "expected": "1", "visibility": "public" },
|
||||
{ "input": "5", "expected": "120", "visibility": "public" },
|
||||
{ "input": "10", "expected": "3628800", "visibility": "hidden" }
|
||||
],
|
||||
"points": 20
|
||||
},
|
||||
{
|
||||
"id": "q5",
|
||||
"type": "code_simple",
|
||||
"prompt": "Implement a function 'isPalindrome' that takes a std::string and returns true if it's a palindrome (reads the same forwards and backwards), false otherwise. Ignore case and spaces.",
|
||||
"language": "cpp",
|
||||
"tests": [
|
||||
{ "input": "\"racecar\"", "expected": "true", "visibility": "public" },
|
||||
{ "input": "\"hello\"", "expected": "false", "visibility": "public" },
|
||||
{ "input": "\"A man a plan a canal Panama\"", "expected": "true", "visibility": "public" },
|
||||
{ "input": "\"Race Car\"", "expected": "true", "visibility": "hidden" }
|
||||
],
|
||||
"points": 25
|
||||
},
|
||||
{
|
||||
"id": "q6",
|
||||
"type": "code_exercise",
|
||||
"prompt": "Create a class 'Vector2D' that represents a 2D vector with x and y components. Implement:\n- Constructor taking x and y\n- operator+ for vector addition\n- operator* for dot product (returns double)\n- magnitude() method returning the length\n- normalize() method returning a unit vector\n\nExample:\nVector2D v1(3, 4);\nVector2D v2(1, 2);\nVector2D v3 = v1 + v2; // Should be (4, 6)\ndouble dot = v1 * v2; // Should be 11\ndouble mag = v1.magnitude(); // Should be 5",
|
||||
"language": "cpp",
|
||||
"tests": [
|
||||
{ "input": "Vector2D(3, 4); Vector2D(1, 2); v1 + v2", "expected": "Vector2D(4, 6)", "visibility": "public" },
|
||||
{ "input": "Vector2D(3, 4); Vector2D(1, 2); v1 * v2", "expected": "11", "visibility": "public" },
|
||||
{ "input": "Vector2D(3, 4); v.magnitude()", "expected": "5", "visibility": "public" },
|
||||
{ "input": "Vector2D(6, 8); v.normalize().magnitude()", "expected": "1", "visibility": "hidden", "weight": 2 }
|
||||
],
|
||||
"rubric": {
|
||||
"criteria": [
|
||||
{ "name": "Constructor implementation", "weight": 0.2 },
|
||||
{ "name": "operator+ overloading", "weight": 0.2 },
|
||||
{ "name": "operator* overloading (dot product)", "weight": 0.2 },
|
||||
{ "name": "magnitude() method", "weight": 0.2 },
|
||||
{ "name": "normalize() method", "weight": 0.2 }
|
||||
],
|
||||
"maxPoints": 30
|
||||
},
|
||||
"starterCode": "class Vector2D {\nprivate:\n double x, y;\npublic:\n // Your implementation here\n};",
|
||||
"points": 30
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"version": "1.0.0",
|
||||
"createdAt": "2025-10-21T17:00:00Z",
|
||||
"createdBy": "system",
|
||||
"tags": ["cpp", "c++", "intermediate", "oop", "coding", "manual-grading"],
|
||||
"description": "Intermediate C++ exam covering OOP concepts with three practical coding tasks: recursion, string manipulation, and class design with operator overloading.",
|
||||
"gradingNotes": "Theory questions (q1-q3) are auto-graded. Coding tasks (q4-q6) require manual review and grading based on rubrics and test cases."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,183 @@
|
||||
{
|
||||
"examId": "linear-algebra-medium-v1",
|
||||
"title": "Linear Algebra - Medium Level (Computational)",
|
||||
"subject": "Linear Algebra",
|
||||
"difficulty": "intermediate",
|
||||
"durationMinutes": 50,
|
||||
"passingScore": 70,
|
||||
"sections": [
|
||||
{
|
||||
"id": "vectors",
|
||||
"title": "Vector Operations & Computations",
|
||||
"questions": [
|
||||
{
|
||||
"id": "q1",
|
||||
"type": "single_choice",
|
||||
"prompt": "Given vectors u = [3, -2, 1] and v = [1, 4, -2], compute u · v (dot product).",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "-7" },
|
||||
{ "key": "B", "text": "-3" },
|
||||
{ "key": "C", "text": "3" },
|
||||
{ "key": "D", "text": "7" }
|
||||
],
|
||||
"answer": "B",
|
||||
"allowIDK": true,
|
||||
"points": 10
|
||||
},
|
||||
{
|
||||
"id": "q2",
|
||||
"type": "single_choice",
|
||||
"prompt": "Calculate the magnitude (length) of vector w = [3, 4]. Give ||w|| = ?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "5" },
|
||||
{ "key": "B", "text": "7" },
|
||||
{ "key": "C", "text": "√7" },
|
||||
{ "key": "D", "text": "25" }
|
||||
],
|
||||
"answer": "A",
|
||||
"allowIDK": true,
|
||||
"points": 10
|
||||
},
|
||||
{
|
||||
"id": "q3",
|
||||
"type": "single_choice",
|
||||
"prompt": "Find the unit vector in the direction of v = [6, 8]. Which is correct?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "[3/5, 4/5]" },
|
||||
{ "key": "B", "text": "[6, 8]" },
|
||||
{ "key": "C", "text": "[1, 1]" },
|
||||
{ "key": "D", "text": "[0.6, 0.8]" }
|
||||
],
|
||||
"answer": "A",
|
||||
"allowIDK": true,
|
||||
"points": 10
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "matrices",
|
||||
"title": "Matrix Operations & Calculations",
|
||||
"questions": [
|
||||
{
|
||||
"id": "q4",
|
||||
"type": "single_choice",
|
||||
"prompt": "Compute AB where A = [[1, 2], [3, 4]] and B = [[2, 0], [1, 3]]. What is the element in position (1,1) of AB?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "2" },
|
||||
{ "key": "B", "text": "4" },
|
||||
{ "key": "C", "text": "6" },
|
||||
{ "key": "D", "text": "8" }
|
||||
],
|
||||
"answer": "B",
|
||||
"allowIDK": true,
|
||||
"points": 10
|
||||
},
|
||||
{
|
||||
"id": "q5",
|
||||
"type": "single_choice",
|
||||
"prompt": "Calculate the determinant of A = [[2, 1], [4, 3]]. det(A) = ?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "1" },
|
||||
{ "key": "B", "text": "2" },
|
||||
{ "key": "C", "text": "6" },
|
||||
{ "key": "D", "text": "10" }
|
||||
],
|
||||
"answer": "B",
|
||||
"allowIDK": true,
|
||||
"points": 10
|
||||
},
|
||||
{
|
||||
"id": "q6",
|
||||
"type": "single_choice",
|
||||
"prompt": "Given matrix A = [[1, 2], [3, 4]], what is the transpose A^T?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "[[1, 3], [2, 4]]" },
|
||||
{ "key": "B", "text": "[[1, 2], [3, 4]]" },
|
||||
{ "key": "C", "text": "[[4, 3], [2, 1]]" },
|
||||
{ "key": "D", "text": "[[1, 0], [0, 1]]" }
|
||||
],
|
||||
"answer": "A",
|
||||
"allowIDK": true,
|
||||
"points": 10
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "systems",
|
||||
"title": "Linear Systems & Solutions",
|
||||
"questions": [
|
||||
{
|
||||
"id": "q7",
|
||||
"type": "single_choice",
|
||||
"prompt": "Solve the system: x + 2y = 7 and 2x - y = 4. What is x?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "x = 1" },
|
||||
{ "key": "B", "text": "x = 2" },
|
||||
{ "key": "C", "text": "x = 3" },
|
||||
{ "key": "D", "text": "x = 4" }
|
||||
],
|
||||
"answer": "C",
|
||||
"allowIDK": true,
|
||||
"points": 15
|
||||
},
|
||||
{
|
||||
"id": "q8",
|
||||
"type": "single_choice",
|
||||
"prompt": "For the inverse of A = [[2, 1], [4, 3]], what is A^(-1)?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "[[3/2, -1/2], [-2, 1]]" },
|
||||
{ "key": "B", "text": "[[3, -1], [-4, 2]]" },
|
||||
{ "key": "C", "text": "[[1/2, 1/2], [1/4, 1/3]]" },
|
||||
{ "key": "D", "text": "[[3/2, 1/2], [2, 1]]" }
|
||||
],
|
||||
"answer": "A",
|
||||
"allowIDK": true,
|
||||
"points": 15
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "eigenvalues",
|
||||
"title": "Eigenvalues & Special Computations",
|
||||
"questions": [
|
||||
{
|
||||
"id": "q9",
|
||||
"type": "single_choice",
|
||||
"prompt": "Find the eigenvalues of matrix A = [[3, 1], [1, 3]]. What are they?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "λ₁ = 2, λ₂ = 4" },
|
||||
{ "key": "B", "text": "λ₁ = 3, λ₂ = 3" },
|
||||
{ "key": "C", "text": "λ₁ = 4, λ₂ = 2" },
|
||||
{ "key": "D", "text": "λ₁ = 1, λ₂ = 5" }
|
||||
],
|
||||
"answer": "C",
|
||||
"allowIDK": true,
|
||||
"points": 15
|
||||
},
|
||||
{
|
||||
"id": "q10",
|
||||
"type": "single_choice",
|
||||
"prompt": "Given matrix A = [[1, 0, 0], [0, 2, 0], [0, 0, 3]], what is the trace of A (sum of diagonal elements)?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "3" },
|
||||
{ "key": "B", "text": "5" },
|
||||
{ "key": "C", "text": "6" },
|
||||
{ "key": "D", "text": "0" }
|
||||
],
|
||||
"answer": "C",
|
||||
"allowIDK": true,
|
||||
"points": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"version": "1.0.0",
|
||||
"createdAt": "2025-10-21T12:30:00Z",
|
||||
"createdBy": "system",
|
||||
"tags": ["linear-algebra", "mathematics", "computational", "intermediate", "auto-graded"],
|
||||
"description": "Medium difficulty Linear Algebra exam requiring calculations for vectors, matrices, linear systems, and eigenvalues.",
|
||||
"calculationNotes": "Students should show work for calculations. Answers are final results only for auto-grading."
|
||||
}
|
||||
}
|
||||
|
||||
219
exam_system/data/input/python/2025-10/python-easy-15q-v1.json
Normal file
219
exam_system/data/input/python/2025-10/python-easy-15q-v1.json
Normal file
@@ -0,0 +1,219 @@
|
||||
{
|
||||
"examId": "python-easy-15q-v1",
|
||||
"title": "Python Fundamentals - Easy Level (15 Questions)",
|
||||
"subject": "Python",
|
||||
"difficulty": "beginner",
|
||||
"durationMinutes": 30,
|
||||
"passingScore": 70,
|
||||
"sections": [
|
||||
{
|
||||
"id": "basics",
|
||||
"title": "Python Basics",
|
||||
"questions": [
|
||||
{
|
||||
"id": "q1",
|
||||
"type": "single_choice",
|
||||
"prompt": "What is the correct way to create a variable in Python?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "int x = 5" },
|
||||
{ "key": "B", "text": "x = 5" },
|
||||
{ "key": "C", "text": "var x = 5" },
|
||||
{ "key": "D", "text": "declare x = 5" }
|
||||
],
|
||||
"answer": "B",
|
||||
"allowIDK": true,
|
||||
"points": 5
|
||||
},
|
||||
{
|
||||
"id": "q2",
|
||||
"type": "true_false",
|
||||
"prompt": "Python is a case-sensitive language.",
|
||||
"answer": true,
|
||||
"allowIDK": true,
|
||||
"points": 5
|
||||
},
|
||||
{
|
||||
"id": "q3",
|
||||
"type": "multiple_choices",
|
||||
"prompt": "Which of the following are valid Python data types? (Select all that apply)",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "int" },
|
||||
{ "key": "B", "text": "string" },
|
||||
{ "key": "C", "text": "float" },
|
||||
{ "key": "D", "text": "bool" }
|
||||
],
|
||||
"answer": ["A", "C", "D"],
|
||||
"partialCredit": true,
|
||||
"allowIDK": true,
|
||||
"points": 10
|
||||
},
|
||||
{
|
||||
"id": "q4",
|
||||
"type": "single_choice",
|
||||
"prompt": "Which keyword is used to define a function in Python?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "function" },
|
||||
{ "key": "B", "text": "def" },
|
||||
{ "key": "C", "text": "func" },
|
||||
{ "key": "D", "text": "define" }
|
||||
],
|
||||
"answer": "B",
|
||||
"allowIDK": true,
|
||||
"points": 5
|
||||
},
|
||||
{
|
||||
"id": "q5",
|
||||
"type": "true_false",
|
||||
"prompt": "In Python, indentation is used to define code blocks.",
|
||||
"answer": true,
|
||||
"allowIDK": true,
|
||||
"points": 5
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "data_structures",
|
||||
"title": "Data Structures",
|
||||
"questions": [
|
||||
{
|
||||
"id": "q6",
|
||||
"type": "multiple_choices",
|
||||
"prompt": "Which of the following are mutable data structures in Python? (Select all that apply)",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "list" },
|
||||
{ "key": "B", "text": "tuple" },
|
||||
{ "key": "C", "text": "dict" },
|
||||
{ "key": "D", "text": "set" }
|
||||
],
|
||||
"answer": ["A", "C", "D"],
|
||||
"partialCredit": true,
|
||||
"allowIDK": true,
|
||||
"points": 10
|
||||
},
|
||||
{
|
||||
"id": "q7",
|
||||
"type": "single_choice",
|
||||
"prompt": "How do you create an empty list in Python?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "list = {}" },
|
||||
{ "key": "B", "text": "list = []" },
|
||||
{ "key": "C", "text": "list = ()" },
|
||||
{ "key": "D", "text": "list = <>" }
|
||||
],
|
||||
"answer": "B",
|
||||
"allowIDK": true,
|
||||
"points": 5
|
||||
},
|
||||
{
|
||||
"id": "q8",
|
||||
"type": "true_false",
|
||||
"prompt": "A tuple in Python can be modified after creation.",
|
||||
"answer": false,
|
||||
"allowIDK": true,
|
||||
"points": 5
|
||||
},
|
||||
{
|
||||
"id": "q9",
|
||||
"type": "single_choice",
|
||||
"prompt": "What is the output of: print(type([1, 2, 3]))",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "<class 'tuple'>" },
|
||||
{ "key": "B", "text": "<class 'list'>" },
|
||||
{ "key": "C", "text": "<class 'array'>" },
|
||||
{ "key": "D", "text": "<class 'set'>" }
|
||||
],
|
||||
"answer": "B",
|
||||
"allowIDK": true,
|
||||
"points": 5
|
||||
},
|
||||
{
|
||||
"id": "q10",
|
||||
"type": "multiple_choices",
|
||||
"prompt": "Which methods can be used to add elements to a list? (Select all that apply)",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "append()" },
|
||||
{ "key": "B", "text": "add()" },
|
||||
{ "key": "C", "text": "insert()" },
|
||||
{ "key": "D", "text": "extend()" }
|
||||
],
|
||||
"answer": ["A", "C", "D"],
|
||||
"partialCredit": true,
|
||||
"allowIDK": true,
|
||||
"points": 10
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "control_flow",
|
||||
"title": "Control Flow",
|
||||
"questions": [
|
||||
{
|
||||
"id": "q11",
|
||||
"type": "true_false",
|
||||
"prompt": "The 'elif' keyword in Python is used for else-if conditions.",
|
||||
"answer": true,
|
||||
"allowIDK": true,
|
||||
"points": 5
|
||||
},
|
||||
{
|
||||
"id": "q12",
|
||||
"type": "single_choice",
|
||||
"prompt": "Which loop is used to iterate over a sequence in Python?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "foreach" },
|
||||
{ "key": "B", "text": "for" },
|
||||
{ "key": "C", "text": "loop" },
|
||||
{ "key": "D", "text": "iterate" }
|
||||
],
|
||||
"answer": "B",
|
||||
"allowIDK": true,
|
||||
"points": 5
|
||||
},
|
||||
{
|
||||
"id": "q13",
|
||||
"type": "multiple_choices",
|
||||
"prompt": "Which statements are valid loop control keywords in Python? (Select all that apply)",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "break" },
|
||||
{ "key": "B", "text": "continue" },
|
||||
{ "key": "C", "text": "pass" },
|
||||
{ "key": "D", "text": "exit" }
|
||||
],
|
||||
"answer": ["A", "B", "C"],
|
||||
"partialCredit": true,
|
||||
"allowIDK": true,
|
||||
"points": 10
|
||||
},
|
||||
{
|
||||
"id": "q14",
|
||||
"type": "true_false",
|
||||
"prompt": "Python supports switch-case statements like C or Java.",
|
||||
"answer": false,
|
||||
"allowIDK": true,
|
||||
"points": 5
|
||||
},
|
||||
{
|
||||
"id": "q15",
|
||||
"type": "single_choice",
|
||||
"prompt": "What does the 'range(5)' function return?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "A list [0, 1, 2, 3, 4]" },
|
||||
{ "key": "B", "text": "A range object representing 0 to 4" },
|
||||
{ "key": "C", "text": "A list [1, 2, 3, 4, 5]" },
|
||||
{ "key": "D", "text": "A range object representing 1 to 5" }
|
||||
],
|
||||
"answer": "B",
|
||||
"allowIDK": true,
|
||||
"points": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"version": "1.0.0",
|
||||
"createdAt": "2025-10-20T20:15:00Z",
|
||||
"createdBy": "system",
|
||||
"tags": ["python", "fundamentals", "beginner", "auto-graded"]
|
||||
}
|
||||
}
|
||||
|
||||
129
exam_system/data/input/python/2025-10/python-easy-v1.json
Normal file
129
exam_system/data/input/python/2025-10/python-easy-v1.json
Normal file
@@ -0,0 +1,129 @@
|
||||
{
|
||||
"examId": "python-easy-v1",
|
||||
"subject": "python",
|
||||
"title": "Python Fundamentals - Easy Level",
|
||||
"difficulty": "easy",
|
||||
"durationMinutes": 45,
|
||||
"sections": [
|
||||
{
|
||||
"id": "sec-mcq",
|
||||
"title": "Multiple Choice Questions",
|
||||
"questions": [
|
||||
{
|
||||
"id": "q1",
|
||||
"type": "single_choice",
|
||||
"prompt": "Which of the following is the correct way to create a list in Python?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "[1, 2, 3]" },
|
||||
{ "key": "B", "text": "(1, 2, 3)" },
|
||||
{ "key": "C", "text": "{1, 2, 3}" },
|
||||
{ "key": "D", "text": "<1, 2, 3>" }
|
||||
],
|
||||
"answer": "A",
|
||||
"points": 5
|
||||
},
|
||||
{
|
||||
"id": "q2",
|
||||
"type": "single_choice",
|
||||
"prompt": "What is the output of: print(type('hello'))?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "<class 'int'>" },
|
||||
{ "key": "B", "text": "<class 'str'>" },
|
||||
{ "key": "C", "text": "<class 'list'>" },
|
||||
{ "key": "D", "text": "<class 'dict'>" }
|
||||
],
|
||||
"answer": "B",
|
||||
"points": 5
|
||||
},
|
||||
{
|
||||
"id": "q3",
|
||||
"type": "single_choice",
|
||||
"prompt": "Which keyword is used to define a function in Python?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "function" },
|
||||
{ "key": "B", "text": "def" },
|
||||
{ "key": "C", "text": "func" },
|
||||
{ "key": "D", "text": "define" }
|
||||
],
|
||||
"answer": "B",
|
||||
"points": 5
|
||||
},
|
||||
{
|
||||
"id": "q4",
|
||||
"type": "single_choice",
|
||||
"prompt": "What does the len() function return?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "The length of an object" },
|
||||
{ "key": "B", "text": "The type of an object" },
|
||||
{ "key": "C", "text": "The value of an object" },
|
||||
{ "key": "D", "text": "The memory address" }
|
||||
],
|
||||
"answer": "A",
|
||||
"points": 5
|
||||
},
|
||||
{
|
||||
"id": "q5",
|
||||
"type": "single_choice",
|
||||
"prompt": "Which of these is a valid variable name in Python?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "2myvar" },
|
||||
{ "key": "B", "text": "my-var" },
|
||||
{ "key": "C", "text": "my_var" },
|
||||
{ "key": "D", "text": "my var" }
|
||||
],
|
||||
"answer": "C",
|
||||
"points": 5
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "sec-tf",
|
||||
"title": "True or False Questions",
|
||||
"questions": [
|
||||
{
|
||||
"id": "q6",
|
||||
"type": "true_false",
|
||||
"prompt": "Python is case-sensitive.",
|
||||
"answer": true,
|
||||
"points": 5
|
||||
},
|
||||
{
|
||||
"id": "q7",
|
||||
"type": "true_false",
|
||||
"prompt": "Lists in Python are immutable.",
|
||||
"answer": false,
|
||||
"points": 5
|
||||
},
|
||||
{
|
||||
"id": "q8",
|
||||
"type": "true_false",
|
||||
"prompt": "The 'print()' function is used to display output in Python.",
|
||||
"answer": true,
|
||||
"points": 5
|
||||
},
|
||||
{
|
||||
"id": "q9",
|
||||
"type": "true_false",
|
||||
"prompt": "Python uses curly braces {} to define code blocks.",
|
||||
"answer": false,
|
||||
"points": 5
|
||||
},
|
||||
{
|
||||
"id": "q10",
|
||||
"type": "true_false",
|
||||
"prompt": "You can use # for comments in Python.",
|
||||
"answer": true,
|
||||
"points": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"createdAt": "2025-10-20T18:30:00Z",
|
||||
"version": "1.0.0",
|
||||
"author": "AI Tutor",
|
||||
"totalPoints": 50,
|
||||
"autoScored": true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,596 @@
|
||||
{
|
||||
"examId": "python-intermediate-v1",
|
||||
"subject": "python",
|
||||
"title": "Python Intermediate - Comprehensive Assessment",
|
||||
"difficulty": "intermediate",
|
||||
"durationMinutes": 90,
|
||||
"sections": [
|
||||
{
|
||||
"id": "sec-mcq-1",
|
||||
"title": "Multiple Choice - Python Fundamentals",
|
||||
"questions": [
|
||||
{
|
||||
"id": "q1",
|
||||
"type": "single_choice",
|
||||
"prompt": "What is the output of: print(type(lambda x: x))?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "<class 'function'>" },
|
||||
{ "key": "B", "text": "<class 'lambda'>" },
|
||||
{ "key": "C", "text": "<class 'method'>" },
|
||||
{ "key": "D", "text": "<class 'callable'>" }
|
||||
],
|
||||
"answer": "A",
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q2",
|
||||
"type": "single_choice",
|
||||
"prompt": "Which of the following is NOT a valid way to create a dictionary?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "d = {}" },
|
||||
{ "key": "B", "text": "d = dict()" },
|
||||
{ "key": "C", "text": "d = dict(a=1, b=2)" },
|
||||
{ "key": "D", "text": "d = [('a', 1), ('b', 2)]" }
|
||||
],
|
||||
"answer": "D",
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q3",
|
||||
"type": "single_choice",
|
||||
"prompt": "What does the 'yield' keyword do in Python?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "Returns a value and exits the function" },
|
||||
{ "key": "B", "text": "Creates a generator function" },
|
||||
{ "key": "C", "text": "Pauses the execution" },
|
||||
{ "key": "D", "text": "Raises an exception" }
|
||||
],
|
||||
"answer": "B",
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q4",
|
||||
"type": "single_choice",
|
||||
"prompt": "Which method is used to add an element to the end of a list?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "insert()" },
|
||||
{ "key": "B", "text": "append()" },
|
||||
{ "key": "C", "text": "extend()" },
|
||||
{ "key": "D", "text": "add()" }
|
||||
],
|
||||
"answer": "B",
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q5",
|
||||
"type": "single_choice",
|
||||
"prompt": "What is the result of: [1, 2, 3] + [4, 5]?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "[1, 2, 3, 4, 5]" },
|
||||
{ "key": "B", "text": "[[1, 2, 3], [4, 5]]" },
|
||||
{ "key": "C", "text": "[5, 7]" },
|
||||
{ "key": "D", "text": "Error" }
|
||||
],
|
||||
"answer": "A",
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q6",
|
||||
"type": "single_choice",
|
||||
"prompt": "Which of these is the correct way to open a file for reading?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "open('file.txt', 'r')" },
|
||||
{ "key": "B", "text": "file('file.txt', 'read')" },
|
||||
{ "key": "C", "text": "read('file.txt')" },
|
||||
{ "key": "D", "text": "open('file.txt', 'read')" }
|
||||
],
|
||||
"answer": "A",
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q7",
|
||||
"type": "single_choice",
|
||||
"prompt": "What does the 'with' statement do in Python?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "Creates a loop" },
|
||||
{ "key": "B", "text": "Imports a module" },
|
||||
{ "key": "C", "text": "Provides context management" },
|
||||
{ "key": "D", "text": "Defines a function" }
|
||||
],
|
||||
"answer": "C",
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q8",
|
||||
"type": "single_choice",
|
||||
"prompt": "Which built-in function returns the number of items in an object?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "count()" },
|
||||
{ "key": "B", "text": "size()" },
|
||||
{ "key": "C", "text": "len()" },
|
||||
{ "key": "D", "text": "length()" }
|
||||
],
|
||||
"answer": "C",
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q9",
|
||||
"type": "single_choice",
|
||||
"prompt": "What is the purpose of __init__ in a Python class?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "To initialize class variables" },
|
||||
{ "key": "B", "text": "To create a constructor" },
|
||||
{ "key": "C", "text": "To define instance initialization" },
|
||||
{ "key": "D", "text": "All of the above" }
|
||||
],
|
||||
"answer": "D",
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q10",
|
||||
"type": "single_choice",
|
||||
"prompt": "Which of these is NOT a Python data type?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "tuple" },
|
||||
{ "key": "B", "text": "array" },
|
||||
{ "key": "C", "text": "set" },
|
||||
{ "key": "D", "text": "frozenset" }
|
||||
],
|
||||
"answer": "B",
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q11",
|
||||
"type": "single_choice",
|
||||
"prompt": "What does the map() function return in Python 3?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "A list" },
|
||||
{ "key": "B", "text": "A map object (iterator)" },
|
||||
{ "key": "C", "text": "A tuple" },
|
||||
{ "key": "D", "text": "A dictionary" }
|
||||
],
|
||||
"answer": "B",
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q12",
|
||||
"type": "single_choice",
|
||||
"prompt": "Which keyword is used to create an anonymous function?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "def" },
|
||||
{ "key": "B", "text": "lambda" },
|
||||
{ "key": "C", "text": "function" },
|
||||
{ "key": "D", "text": "anonymous" }
|
||||
],
|
||||
"answer": "B",
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q13",
|
||||
"type": "single_choice",
|
||||
"prompt": "What is the correct way to handle exceptions in Python?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "try/catch" },
|
||||
{ "key": "B", "text": "try/except" },
|
||||
{ "key": "C", "text": "catch/finally" },
|
||||
{ "key": "D", "text": "error/handle" }
|
||||
],
|
||||
"answer": "B",
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q14",
|
||||
"type": "single_choice",
|
||||
"prompt": "Which module is used for regular expressions in Python?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "regex" },
|
||||
{ "key": "B", "text": "re" },
|
||||
{ "key": "C", "text": "regexp" },
|
||||
{ "key": "D", "text": "pattern" }
|
||||
],
|
||||
"answer": "B",
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q15",
|
||||
"type": "single_choice",
|
||||
"prompt": "What is the output of: bool([])?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "True" },
|
||||
{ "key": "B", "text": "False" },
|
||||
{ "key": "C", "text": "None" },
|
||||
{ "key": "D", "text": "Error" }
|
||||
],
|
||||
"answer": "B",
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q16",
|
||||
"type": "single_choice",
|
||||
"prompt": "Which method is used to remove whitespace from both ends of a string?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "trim()" },
|
||||
{ "key": "B", "text": "strip()" },
|
||||
{ "key": "C", "text": "remove()" },
|
||||
{ "key": "D", "text": "clean()" }
|
||||
],
|
||||
"answer": "B",
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q17",
|
||||
"type": "single_choice",
|
||||
"prompt": "What does *args allow in a function definition?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "Variable number of positional arguments" },
|
||||
{ "key": "B", "text": "Variable number of keyword arguments" },
|
||||
{ "key": "C", "text": "Required arguments" },
|
||||
{ "key": "D", "text": "Optional arguments" }
|
||||
],
|
||||
"answer": "A",
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q18",
|
||||
"type": "single_choice",
|
||||
"prompt": "Which operator is used for floor division in Python?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "/" },
|
||||
{ "key": "B", "text": "//" },
|
||||
{ "key": "C", "text": "%" },
|
||||
{ "key": "D", "text": "div" }
|
||||
],
|
||||
"answer": "B",
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q19",
|
||||
"type": "single_choice",
|
||||
"prompt": "What is the correct syntax for a list comprehension?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "[x for x in range(10)]" },
|
||||
{ "key": "B", "text": "(x for x in range(10))" },
|
||||
{ "key": "C", "text": "{x for x in range(10)}" },
|
||||
{ "key": "D", "text": "for x in range(10): x" }
|
||||
],
|
||||
"answer": "A",
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q20",
|
||||
"type": "single_choice",
|
||||
"prompt": "Which method converts a string to lowercase?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "toLower()" },
|
||||
{ "key": "B", "text": "lowercase()" },
|
||||
{ "key": "C", "text": "lower()" },
|
||||
{ "key": "D", "text": "downcase()" }
|
||||
],
|
||||
"answer": "C",
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q21",
|
||||
"type": "single_choice",
|
||||
"prompt": "What is the purpose of the 'pass' statement?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "To skip the current iteration" },
|
||||
{ "key": "B", "text": "To do nothing (placeholder)" },
|
||||
{ "key": "C", "text": "To return None" },
|
||||
{ "key": "D", "text": "To exit the loop" }
|
||||
],
|
||||
"answer": "B",
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q22",
|
||||
"type": "single_choice",
|
||||
"prompt": "Which of these is a mutable data type?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "tuple" },
|
||||
{ "key": "B", "text": "string" },
|
||||
{ "key": "C", "text": "list" },
|
||||
{ "key": "D", "text": "int" }
|
||||
],
|
||||
"answer": "C",
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q23",
|
||||
"type": "single_choice",
|
||||
"prompt": "What does the enumerate() function return?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "A list of tuples with index and value" },
|
||||
{ "key": "B", "text": "An enumerate object (iterator)" },
|
||||
{ "key": "C", "text": "A dictionary" },
|
||||
{ "key": "D", "text": "A range object" }
|
||||
],
|
||||
"answer": "B",
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q24",
|
||||
"type": "single_choice",
|
||||
"prompt": "Which decorator is used to define a class method?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "@staticmethod" },
|
||||
{ "key": "B", "text": "@classmethod" },
|
||||
{ "key": "C", "text": "@method" },
|
||||
{ "key": "D", "text": "@class" }
|
||||
],
|
||||
"answer": "B",
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q25",
|
||||
"type": "single_choice",
|
||||
"prompt": "What is the result of: 'python'[1:4]?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "pyt" },
|
||||
{ "key": "B", "text": "yth" },
|
||||
{ "key": "C", "text": "ytho" },
|
||||
{ "key": "D", "text": "pyth" }
|
||||
],
|
||||
"answer": "B",
|
||||
"points": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "sec-mcq-2",
|
||||
"title": "Multiple Choice - Advanced Concepts",
|
||||
"questions": [
|
||||
{
|
||||
"id": "q26",
|
||||
"type": "single_choice",
|
||||
"prompt": "What is a closure in Python?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "A function that returns another function" },
|
||||
{ "key": "B", "text": "A function that has access to variables from its enclosing scope" },
|
||||
{ "key": "C", "text": "A private function" },
|
||||
{ "key": "D", "text": "A function without parameters" }
|
||||
],
|
||||
"answer": "B",
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q27",
|
||||
"type": "single_choice",
|
||||
"prompt": "What does the zip() function do?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "Compresses files" },
|
||||
{ "key": "B", "text": "Combines multiple iterables into tuples" },
|
||||
{ "key": "C", "text": "Filters a list" },
|
||||
{ "key": "D", "text": "Sorts a list" }
|
||||
],
|
||||
"answer": "B",
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q28",
|
||||
"type": "single_choice",
|
||||
"prompt": "Which of these creates a shallow copy of a list?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "list.copy()" },
|
||||
{ "key": "B", "text": "list[:]" },
|
||||
{ "key": "C", "text": "list(list)" },
|
||||
{ "key": "D", "text": "All of the above" }
|
||||
],
|
||||
"answer": "D",
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q29",
|
||||
"type": "single_choice",
|
||||
"prompt": "What is the purpose of __str__ method in a class?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "To convert the object to a string for display" },
|
||||
{ "key": "B", "text": "To compare two objects" },
|
||||
{ "key": "C", "text": "To initialize the object" },
|
||||
{ "key": "D", "text": "To delete the object" }
|
||||
],
|
||||
"answer": "A",
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q30",
|
||||
"type": "single_choice",
|
||||
"prompt": "What does the 'is' operator check?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "Value equality" },
|
||||
{ "key": "B", "text": "Type equality" },
|
||||
{ "key": "C", "text": "Identity (same object in memory)" },
|
||||
{ "key": "D", "text": "None of the above" }
|
||||
],
|
||||
"answer": "C",
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q31",
|
||||
"type": "single_choice",
|
||||
"prompt": "Which of these is the correct way to import all functions from a module?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "import module.*" },
|
||||
{ "key": "B", "text": "from module import *" },
|
||||
{ "key": "C", "text": "import * from module" },
|
||||
{ "key": "D", "text": "include module" }
|
||||
],
|
||||
"answer": "B",
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q32",
|
||||
"type": "single_choice",
|
||||
"prompt": "What is the output of: print(10 // 3)?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "3.33" },
|
||||
{ "key": "B", "text": "3" },
|
||||
{ "key": "C", "text": "4" },
|
||||
{ "key": "D", "text": "3.0" }
|
||||
],
|
||||
"answer": "B",
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q33",
|
||||
"type": "single_choice",
|
||||
"prompt": "Which method is used to remove and return an arbitrary element from a set?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "remove()" },
|
||||
{ "key": "B", "text": "discard()" },
|
||||
{ "key": "C", "text": "pop()" },
|
||||
{ "key": "D", "text": "delete()" }
|
||||
],
|
||||
"answer": "C",
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q34",
|
||||
"type": "single_choice",
|
||||
"prompt": "What is the difference between '==' and 'is'?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "'==' checks value, 'is' checks identity" },
|
||||
{ "key": "B", "text": "They are the same" },
|
||||
{ "key": "C", "text": "'==' checks type, 'is' checks value" },
|
||||
{ "key": "D", "text": "'is' is faster" }
|
||||
],
|
||||
"answer": "A",
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q35",
|
||||
"type": "single_choice",
|
||||
"prompt": "Which function is used to get the absolute value of a number?",
|
||||
"choices": [
|
||||
{ "key": "A", "text": "absolute()" },
|
||||
{ "key": "B", "text": "abs()" },
|
||||
{ "key": "C", "text": "fabs()" },
|
||||
{ "key": "D", "text": "absolute_value()" }
|
||||
],
|
||||
"answer": "B",
|
||||
"points": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "sec-tf-1",
|
||||
"title": "True/False - Python Basics",
|
||||
"questions": [
|
||||
{
|
||||
"id": "q36",
|
||||
"type": "true_false",
|
||||
"prompt": "Python is a statically typed language.",
|
||||
"answer": false,
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q37",
|
||||
"type": "true_false",
|
||||
"prompt": "Lists in Python can contain elements of different types.",
|
||||
"answer": true,
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q38",
|
||||
"type": "true_false",
|
||||
"prompt": "The 'global' keyword is used to modify a variable outside the current scope.",
|
||||
"answer": true,
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q39",
|
||||
"type": "true_false",
|
||||
"prompt": "Python uses curly braces {} to define code blocks.",
|
||||
"answer": false,
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q40",
|
||||
"type": "true_false",
|
||||
"prompt": "Dictionaries in Python 3.7+ maintain insertion order.",
|
||||
"answer": true,
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q41",
|
||||
"type": "true_false",
|
||||
"prompt": "The 'elif' keyword is short for 'else if'.",
|
||||
"answer": true,
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q42",
|
||||
"type": "true_false",
|
||||
"prompt": "Python strings are mutable.",
|
||||
"answer": false,
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q43",
|
||||
"type": "true_false",
|
||||
"prompt": "The range() function returns a list in Python 3.",
|
||||
"answer": false,
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q44",
|
||||
"type": "true_false",
|
||||
"prompt": "Python supports multiple inheritance.",
|
||||
"answer": true,
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q45",
|
||||
"type": "true_false",
|
||||
"prompt": "The 'break' statement terminates the entire program.",
|
||||
"answer": false,
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q46",
|
||||
"type": "true_false",
|
||||
"prompt": "List comprehensions are generally faster than equivalent for loops.",
|
||||
"answer": true,
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q47",
|
||||
"type": "true_false",
|
||||
"prompt": "Python allows you to chain comparison operators (e.g., 1 < x < 10).",
|
||||
"answer": true,
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q48",
|
||||
"type": "true_false",
|
||||
"prompt": "The 'in' operator can be used with dictionaries to check for keys.",
|
||||
"answer": true,
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q49",
|
||||
"type": "true_false",
|
||||
"prompt": "Python uses 0-based indexing for sequences.",
|
||||
"answer": true,
|
||||
"points": 2
|
||||
},
|
||||
{
|
||||
"id": "q50",
|
||||
"type": "true_false",
|
||||
"prompt": "The 'None' keyword is equivalent to null in other languages.",
|
||||
"answer": true,
|
||||
"points": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"createdAt": "2025-10-20T19:40:00Z",
|
||||
"version": "1.0.0",
|
||||
"author": "AI Tutor",
|
||||
"totalPoints": 100,
|
||||
"autoScored": true,
|
||||
"questionCount": 50
|
||||
}
|
||||
}
|
||||
|
||||
65
exam_system/data/manifest.json
Normal file
65
exam_system/data/manifest.json
Normal file
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"exams": [
|
||||
{
|
||||
"examId": "python-easy-v1",
|
||||
"subject": "python",
|
||||
"month": "2025-10",
|
||||
"path": "python/2025-10/python-easy-v1.json",
|
||||
"published": true,
|
||||
"version": "1.0.0"
|
||||
},
|
||||
{
|
||||
"examId": "python-intermediate-v1",
|
||||
"subject": "python",
|
||||
"month": "2025-10",
|
||||
"path": "python/2025-10/python-intermediate-v1.json",
|
||||
"published": true,
|
||||
"version": "1.0.0"
|
||||
},
|
||||
{
|
||||
"examId": "python-easy-15q-v1",
|
||||
"subject": "python",
|
||||
"month": "2025-10",
|
||||
"path": "python/2025-10/python-easy-15q-v1.json",
|
||||
"published": true,
|
||||
"version": "1.0.0"
|
||||
},
|
||||
{
|
||||
"examId": "cpp-easy-v1",
|
||||
"subject": "cpp",
|
||||
"month": "2025-10",
|
||||
"path": "cpp/2025-10/cpp-easy-v1.json",
|
||||
"published": true,
|
||||
"version": "1.0.0"
|
||||
},
|
||||
{
|
||||
"examId": "linear-algebra-medium-v1",
|
||||
"subject": "linear_algebra",
|
||||
"month": "2025-10",
|
||||
"path": "linear_algebra/2025-10/linear-algebra-medium-v1.json",
|
||||
"published": true,
|
||||
"version": "1.0.0"
|
||||
},
|
||||
{
|
||||
"examId": "cpp-intermediate-v1",
|
||||
"subject": "cpp",
|
||||
"month": "2025-10",
|
||||
"path": "cpp/2025-10/cpp-intermediate-v1.json",
|
||||
"published": true,
|
||||
"version": "1.0.0"
|
||||
}
|
||||
],
|
||||
"users": {
|
||||
"3": {
|
||||
"active": [],
|
||||
"finished": [
|
||||
"python-easy-15q-v1",
|
||||
"python-easy-v1",
|
||||
"cpp-easy-v1",
|
||||
"linear-algebra-medium-v1",
|
||||
"cpp-intermediate-v1"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
0
exam_system/data/progress/.gitkeep
Normal file
0
exam_system/data/progress/.gitkeep
Normal file
Reference in New Issue
Block a user