All files / data conceptGraph.ts

0% Statements 0/2
100% Branches 0/0
100% Functions 0/0
0% Lines 0/2

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
export interface MajorConcept {
  id: string;
  label: string;
  color: string;
  subconcepts: string[];
}
 
export const majorConcepts: MajorConcept[] = [
  {
    id: "data-types",
    label: "Basic \n Data Types",
    color: "#c99ffe",
    subconcepts: ["Numeric (integers, floats)", "Strings", "Booleans"],
  },
  {
    id: "data-rep",
    label: "Data \n Representation",
    color: "#feaef2",
    subconcepts: ["Binary", "Hex", "Decimal", "Converting between bases"],
  },
  {
    id: "variables",
    label: "Variables",
    color: "#feaef2",
    subconcepts: ["Variable names", "Variable assignment", "+= and -="],
  },
  {
    id: "arithmetic-ops",
    label: "Arithmetic \n Operations",
    color: "#feaef2",
    subconcepts: [
      "Simple arithmetic",
      "Division",
      "Modulo",
      "Order of operations",
    ],
  },
  {
    id: "string-ops",
    label: "String \n Operations",
    color: "#93ebff",
    subconcepts: [
      "String concatenation",
      "String formatting (f-strings)",
      "String slicing",
      "Comments",
    ],
  },
  {
    id: "boolean-expr",
    label: "Boolean \n Expressions",
    color: "#feaef2",
    subconcepts: [
      "Comparison: ==, <, <=, !=",
      "Logical: and, or, not",
      "Membership: in, not in",
    ],
  },
  {
    id: "conditionals",
    label: "Conditional \n Statements",
    color: "#93ebff",
    subconcepts: ["if", "else", "elif"],
  },
  {
    id: "functions",
    label: "Functions",
    color: "#93ebff",
    subconcepts: [
      "Defining functions",
      "Calling functions",
      "Function parameters",
      "Return statements",
    ],
  },
  {
    id: "built-in-fns",
    label: "Built-in \n Functions",
    color: "#fe9a71",
    subconcepts: ["len()", "min() and max()", "range()", "Type casting"],
  },
  {
    id: "main-fn",
    label: 'if __name__ \n == "__main__":',
    color: "#fe9a71",
    subconcepts: ["Program structure", 'Using if __name__ == "__main__"'],
  },
  {
    id: "dictionaries",
    label: "Dictionaries",
    color: "#93ebff",
    subconcepts: [
      "Creating a dictionary",
      "Accessing a value",
      "Adding/updating a key",
    ],
  },
  {
    id: "input-output",
    label: "Input \n & Output",
    color: "#2bcd9c",
    subconcepts: ["input()", "print()"],
  },
  {
    id: "loops",
    label: "Loops",
    color: "#fe9a71",
    subconcepts: [
      "For loops",
      "While loops",
      "Break",
      "Continue",
      "Iteration",
      "Accumulator pattern",
    ],
  },
  {
    id: "lists",
    label: "Lists",
    color: "#93ebff",
    subconcepts: ["Creating a list", "Accessing a value", "List slicing"],
  },
  {
    id: "nested-lists",
    label: "Nested \n Lists",
    color: "#fe9a71",
    subconcepts: ["Creating a nested list", "Accessing values"],
  },
  {
    id: "nested-loops",
    label: "Nested \n Loops",
    color: "#2bcd9c",
    subconcepts: ["Creating a nested loop", "Iterating over a nested list"],
  },
  {
    id: "tuples",
    label: "Tuples",
    color: "#93ebff",
    subconcepts: ["Creating a tuple", "Accessing a value"],
  },
  {
    id: "sets",
    label: "Sets",
    color: "#93ebff",
    subconcepts: ["Creating a set", "Adding an element"],
  },
  {
    id: "recursion",
    label: "Recursion",
    color: "#fe9a71",
    subconcepts: ["Base case", "State change", "Recursive step"],
  },
  {
    id: "files",
    label: "Files",
    color: "#2bcd9c",
    subconcepts: [
      "Opening & closing files",
      "Reading a file",
      "Writing to a file",
    ],
  },
  {
    id: "methods",
    label: "Built-in \n Methods",
    color: "#fe9a71",
    subconcepts: ["Calling a method", "List methods"],
  },
  {
    id: "string-methods",
    label: "String \n Methods",
    color: "#2bcd9c",
    subconcepts: ["upper() and lower()", "replace()", "split()"],
  },
  {
    id: "modules",
    label: "Imports & Modules",
    color: "#2bcd9c",
    subconcepts: ["Importing modules", "random", "math"],
  },
  {
    id: "mutability",
    label: "Mutability",
    color: "#fe9a71",
    subconcepts: ["Mutable objects", "Immutable objects"],
  },
  {
    id: "testing",
    label: "Testing",
    color: "#fe9a71",
    subconcepts: ["assert statements", "Writing test functions", "Edge cases"],
  },
  {
    id: "errors-debugging",
    label: "Errors & \n Debugging",
    color: "#93ebff",
    subconcepts: [
      "Syntax errors",
      "Runtime errors",
      "try / except",
      "Reading tracebacks",
    ],
  },
];
 
export const prereqEdgeData = [
  // Up from Level 1
  { source: "data-types", target: "variables" },
  { source: "data-types", target: "arithmetic-ops" },
  { source: "data-types", target: "data-rep" },
  { source: "data-types", target: "boolean-expr" },
 
  // Up from Level 2
  { source: "variables", target: "lists" },
  { source: "variables", target: "functions" },
  { source: "variables", target: "dictionaries" },
  { source: "variables", target: "sets" },
  { source: "variables", target: "tuples" },
  { source: "variables", target: "string-ops" },
  { source: "boolean-expr", target: "conditionals" },
  { source: "boolean-expr", target: "loops" },
  { source: "variables", target: "errors-debugging" },
  { source: "arithmetic-ops", target: "errors-debugging" },
  { source: "arithmetic-ops", target: "recursion" },
  { source: "arithmetic-ops", target: "loops" },
  { source: "arithmetic-ops", target: "string-ops" },
 
  // Up from Level 3
  { source: "conditionals", target: "main-fn" },
  { source: "conditionals", target: "main-fn" },
  { source: "conditionals", target: "recursion" },
  { source: "functions", target: "testing" },
  { source: "functions", target: "main-fn" },
  { source: "functions", target: "built-in-fns" },
  { source: "functions", target: "methods" },
  { source: "functions", target: "recursion" },
  { source: "lists", target: "nested-lists" },
  { source: "lists", target: "mutability" },
  { source: "lists", target: "loops" },
  { source: "dictionaries", target: "mutability" },
  { source: "tuples", target: "mutability" },
  { source: "sets", target: "mutability" },
 
  // Up from Level 4
  { source: "loops", target: "nested-loops" },
  { source: "dictionaries", target: "mutability" },
  { source: "built-in-fns", target: "input-output" },
  { source: "built-in-fns", target: "files" },
  { source: "methods", target: "string-methods" },
  { source: "methods", target: "modules" },
  { source: "nested-lists", target: "nested-loops" },
];
 
/*
Level 1: Basic Data Types
Level 2: Data Representation, Variables, Arithmetic Operations,Boolean Expressions
Level 3: String Operations, Functions, Lists, Dictionaries, Tuples, Sets, Conditional Statements, Errors & Debugging
Level 4: Testing, Recursion, Built-in Functions, Nested Lists, Built-in Methods, Mutability, Nested Loops, Main Function
Level 5: Input & Output, String Methods, Files, Imports & Modules
*/