pythonlings 0.3.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (942) hide show
  1. pythonlings/__init__.py +0 -0
  2. pythonlings/__main__.py +4 -0
  3. pythonlings/app.py +84 -0
  4. pythonlings/cli.py +318 -0
  5. pythonlings/core/__init__.py +0 -0
  6. pythonlings/core/curriculum.py +106 -0
  7. pythonlings/core/docs.py +68 -0
  8. pythonlings/core/exercise.py +33 -0
  9. pythonlings/core/manifest.py +110 -0
  10. pythonlings/core/reset.py +43 -0
  11. pythonlings/core/runner.py +114 -0
  12. pythonlings/core/solutions.py +17 -0
  13. pythonlings/core/state.py +86 -0
  14. pythonlings/curriculum/checks/async/async1.py +4 -0
  15. pythonlings/curriculum/checks/async/async10.py +4 -0
  16. pythonlings/curriculum/checks/async/async2.py +4 -0
  17. pythonlings/curriculum/checks/async/async3.py +4 -0
  18. pythonlings/curriculum/checks/async/async4.py +4 -0
  19. pythonlings/curriculum/checks/async/async5.py +4 -0
  20. pythonlings/curriculum/checks/async/async6.py +4 -0
  21. pythonlings/curriculum/checks/async/async7.py +4 -0
  22. pythonlings/curriculum/checks/async/async8.py +2 -0
  23. pythonlings/curriculum/checks/async/async9.py +4 -0
  24. pythonlings/curriculum/checks/classes/classes1.py +3 -0
  25. pythonlings/curriculum/checks/classes/classes10.py +5 -0
  26. pythonlings/curriculum/checks/classes/classes11.py +5 -0
  27. pythonlings/curriculum/checks/classes/classes12.py +16 -0
  28. pythonlings/curriculum/checks/classes/classes2.py +3 -0
  29. pythonlings/curriculum/checks/classes/classes3.py +4 -0
  30. pythonlings/curriculum/checks/classes/classes4.py +4 -0
  31. pythonlings/curriculum/checks/classes/classes5.py +5 -0
  32. pythonlings/curriculum/checks/classes/classes6.py +4 -0
  33. pythonlings/curriculum/checks/classes/classes7.py +3 -0
  34. pythonlings/curriculum/checks/classes/classes8.py +3 -0
  35. pythonlings/curriculum/checks/classes/classes9.py +4 -0
  36. pythonlings/curriculum/checks/collections/collections1.py +4 -0
  37. pythonlings/curriculum/checks/collections/collections10.py +15 -0
  38. pythonlings/curriculum/checks/collections/collections2.py +4 -0
  39. pythonlings/curriculum/checks/collections/collections3.py +5 -0
  40. pythonlings/curriculum/checks/collections/collections4.py +4 -0
  41. pythonlings/curriculum/checks/collections/collections5.py +5 -0
  42. pythonlings/curriculum/checks/collections/collections6.py +6 -0
  43. pythonlings/curriculum/checks/collections/collections7.py +4 -0
  44. pythonlings/curriculum/checks/collections/collections8.py +5 -0
  45. pythonlings/curriculum/checks/collections/collections9.py +9 -0
  46. pythonlings/curriculum/checks/comprehensions/comprehensions1.py +3 -0
  47. pythonlings/curriculum/checks/comprehensions/comprehensions10.py +5 -0
  48. pythonlings/curriculum/checks/comprehensions/comprehensions2.py +3 -0
  49. pythonlings/curriculum/checks/comprehensions/comprehensions3.py +3 -0
  50. pythonlings/curriculum/checks/comprehensions/comprehensions4.py +6 -0
  51. pythonlings/curriculum/checks/comprehensions/comprehensions5.py +3 -0
  52. pythonlings/curriculum/checks/comprehensions/comprehensions6.py +3 -0
  53. pythonlings/curriculum/checks/comprehensions/comprehensions7.py +4 -0
  54. pythonlings/curriculum/checks/comprehensions/comprehensions8.py +5 -0
  55. pythonlings/curriculum/checks/comprehensions/comprehensions9.py +3 -0
  56. pythonlings/curriculum/checks/conditionals/conditionals1.py +2 -0
  57. pythonlings/curriculum/checks/conditionals/conditionals10.py +10 -0
  58. pythonlings/curriculum/checks/conditionals/conditionals2.py +5 -0
  59. pythonlings/curriculum/checks/conditionals/conditionals3.py +9 -0
  60. pythonlings/curriculum/checks/conditionals/conditionals4.py +7 -0
  61. pythonlings/curriculum/checks/conditionals/conditionals5.py +9 -0
  62. pythonlings/curriculum/checks/conditionals/conditionals6.py +7 -0
  63. pythonlings/curriculum/checks/conditionals/conditionals7.py +7 -0
  64. pythonlings/curriculum/checks/conditionals/conditionals8.py +9 -0
  65. pythonlings/curriculum/checks/conditionals/conditionals9.py +7 -0
  66. pythonlings/curriculum/checks/context_managers/context_managers1.py +15 -0
  67. pythonlings/curriculum/checks/context_managers/context_managers2.py +10 -0
  68. pythonlings/curriculum/checks/context_managers/context_managers3.py +2 -0
  69. pythonlings/curriculum/checks/context_managers/context_managers4.py +3 -0
  70. pythonlings/curriculum/checks/context_managers/context_managers5.py +5 -0
  71. pythonlings/curriculum/checks/context_managers/context_managers6.py +4 -0
  72. pythonlings/curriculum/checks/context_managers/context_managers7.py +16 -0
  73. pythonlings/curriculum/checks/context_managers/context_managers8.py +15 -0
  74. pythonlings/curriculum/checks/dataclasses/dataclasses1.py +3 -0
  75. pythonlings/curriculum/checks/dataclasses/dataclasses2.py +5 -0
  76. pythonlings/curriculum/checks/dataclasses/dataclasses3.py +4 -0
  77. pythonlings/curriculum/checks/dataclasses/dataclasses4.py +3 -0
  78. pythonlings/curriculum/checks/dataclasses/dataclasses5.py +9 -0
  79. pythonlings/curriculum/checks/dataclasses/dataclasses6.py +6 -0
  80. pythonlings/curriculum/checks/dataclasses/dataclasses7.py +6 -0
  81. pythonlings/curriculum/checks/dataclasses/dataclasses8.py +5 -0
  82. pythonlings/curriculum/checks/datetime/datetime1.py +4 -0
  83. pythonlings/curriculum/checks/datetime/datetime2.py +4 -0
  84. pythonlings/curriculum/checks/datetime/datetime3.py +6 -0
  85. pythonlings/curriculum/checks/datetime/datetime4.py +2 -0
  86. pythonlings/curriculum/checks/datetime/datetime5.py +2 -0
  87. pythonlings/curriculum/checks/datetime/datetime6.py +2 -0
  88. pythonlings/curriculum/checks/datetime/datetime7.py +2 -0
  89. pythonlings/curriculum/checks/datetime/datetime8.py +5 -0
  90. pythonlings/curriculum/checks/decorators/decorators1.py +8 -0
  91. pythonlings/curriculum/checks/decorators/decorators10.py +12 -0
  92. pythonlings/curriculum/checks/decorators/decorators2.py +5 -0
  93. pythonlings/curriculum/checks/decorators/decorators3.py +4 -0
  94. pythonlings/curriculum/checks/decorators/decorators4.py +7 -0
  95. pythonlings/curriculum/checks/decorators/decorators5.py +5 -0
  96. pythonlings/curriculum/checks/decorators/decorators6.py +8 -0
  97. pythonlings/curriculum/checks/decorators/decorators7.py +12 -0
  98. pythonlings/curriculum/checks/decorators/decorators8.py +20 -0
  99. pythonlings/curriculum/checks/decorators/decorators9.py +4 -0
  100. pythonlings/curriculum/checks/dictionaries/dictionaries1.py +3 -0
  101. pythonlings/curriculum/checks/dictionaries/dictionaries10.py +5 -0
  102. pythonlings/curriculum/checks/dictionaries/dictionaries2.py +2 -0
  103. pythonlings/curriculum/checks/dictionaries/dictionaries3.py +5 -0
  104. pythonlings/curriculum/checks/dictionaries/dictionaries4.py +5 -0
  105. pythonlings/curriculum/checks/dictionaries/dictionaries5.py +11 -0
  106. pythonlings/curriculum/checks/dictionaries/dictionaries6.py +4 -0
  107. pythonlings/curriculum/checks/dictionaries/dictionaries7.py +5 -0
  108. pythonlings/curriculum/checks/dictionaries/dictionaries8.py +4 -0
  109. pythonlings/curriculum/checks/dictionaries/dictionaries9.py +4 -0
  110. pythonlings/curriculum/checks/enums/enums1.py +4 -0
  111. pythonlings/curriculum/checks/enums/enums2.py +3 -0
  112. pythonlings/curriculum/checks/enums/enums3.py +3 -0
  113. pythonlings/curriculum/checks/enums/enums4.py +2 -0
  114. pythonlings/curriculum/checks/enums/enums5.py +4 -0
  115. pythonlings/curriculum/checks/enums/enums6.py +3 -0
  116. pythonlings/curriculum/checks/exceptions/exceptions1.py +4 -0
  117. pythonlings/curriculum/checks/exceptions/exceptions10.py +39 -0
  118. pythonlings/curriculum/checks/exceptions/exceptions2.py +5 -0
  119. pythonlings/curriculum/checks/exceptions/exceptions3.py +8 -0
  120. pythonlings/curriculum/checks/exceptions/exceptions4.py +5 -0
  121. pythonlings/curriculum/checks/exceptions/exceptions5.py +10 -0
  122. pythonlings/curriculum/checks/exceptions/exceptions6.py +17 -0
  123. pythonlings/curriculum/checks/exceptions/exceptions7.py +15 -0
  124. pythonlings/curriculum/checks/exceptions/exceptions8.py +6 -0
  125. pythonlings/curriculum/checks/exceptions/exceptions9.py +16 -0
  126. pythonlings/curriculum/checks/file_io/file_io1.py +15 -0
  127. pythonlings/curriculum/checks/file_io/file_io10.py +16 -0
  128. pythonlings/curriculum/checks/file_io/file_io2.py +10 -0
  129. pythonlings/curriculum/checks/file_io/file_io3.py +15 -0
  130. pythonlings/curriculum/checks/file_io/file_io4.py +14 -0
  131. pythonlings/curriculum/checks/file_io/file_io5.py +15 -0
  132. pythonlings/curriculum/checks/file_io/file_io6.py +10 -0
  133. pythonlings/curriculum/checks/file_io/file_io7.py +15 -0
  134. pythonlings/curriculum/checks/file_io/file_io8.py +12 -0
  135. pythonlings/curriculum/checks/file_io/file_io9.py +10 -0
  136. pythonlings/curriculum/checks/functional/functional1.py +4 -0
  137. pythonlings/curriculum/checks/functional/functional10.py +7 -0
  138. pythonlings/curriculum/checks/functional/functional2.py +5 -0
  139. pythonlings/curriculum/checks/functional/functional3.py +3 -0
  140. pythonlings/curriculum/checks/functional/functional4.py +4 -0
  141. pythonlings/curriculum/checks/functional/functional5.py +6 -0
  142. pythonlings/curriculum/checks/functional/functional6.py +8 -0
  143. pythonlings/curriculum/checks/functional/functional7.py +8 -0
  144. pythonlings/curriculum/checks/functional/functional8.py +7 -0
  145. pythonlings/curriculum/checks/functional/functional9.py +8 -0
  146. pythonlings/curriculum/checks/functions/functions1.py +9 -0
  147. pythonlings/curriculum/checks/functions/functions10.py +12 -0
  148. pythonlings/curriculum/checks/functions/functions2.py +4 -0
  149. pythonlings/curriculum/checks/functions/functions3.py +6 -0
  150. pythonlings/curriculum/checks/functions/functions4.py +6 -0
  151. pythonlings/curriculum/checks/functions/functions5.py +6 -0
  152. pythonlings/curriculum/checks/functions/functions6.py +8 -0
  153. pythonlings/curriculum/checks/functions/functions7.py +7 -0
  154. pythonlings/curriculum/checks/functions/functions8.py +6 -0
  155. pythonlings/curriculum/checks/functions/functions9.py +7 -0
  156. pythonlings/curriculum/checks/generators/generators1.py +4 -0
  157. pythonlings/curriculum/checks/generators/generators10.py +7 -0
  158. pythonlings/curriculum/checks/generators/generators2.py +3 -0
  159. pythonlings/curriculum/checks/generators/generators3.py +4 -0
  160. pythonlings/curriculum/checks/generators/generators4.py +9 -0
  161. pythonlings/curriculum/checks/generators/generators5.py +10 -0
  162. pythonlings/curriculum/checks/generators/generators6.py +8 -0
  163. pythonlings/curriculum/checks/generators/generators7.py +11 -0
  164. pythonlings/curriculum/checks/generators/generators8.py +8 -0
  165. pythonlings/curriculum/checks/generators/generators9.py +13 -0
  166. pythonlings/curriculum/checks/itertools/itertools1.py +2 -0
  167. pythonlings/curriculum/checks/itertools/itertools2.py +2 -0
  168. pythonlings/curriculum/checks/itertools/itertools3.py +2 -0
  169. pythonlings/curriculum/checks/itertools/itertools4.py +2 -0
  170. pythonlings/curriculum/checks/itertools/itertools5.py +2 -0
  171. pythonlings/curriculum/checks/itertools/itertools6.py +2 -0
  172. pythonlings/curriculum/checks/itertools/itertools7.py +2 -0
  173. pythonlings/curriculum/checks/itertools/itertools8.py +3 -0
  174. pythonlings/curriculum/checks/json/json1.py +3 -0
  175. pythonlings/curriculum/checks/json/json2.py +2 -0
  176. pythonlings/curriculum/checks/json/json3.py +2 -0
  177. pythonlings/curriculum/checks/json/json4.py +2 -0
  178. pythonlings/curriculum/checks/json/json5.py +2 -0
  179. pythonlings/curriculum/checks/json/json6.py +2 -0
  180. pythonlings/curriculum/checks/json/json7.py +3 -0
  181. pythonlings/curriculum/checks/json/json8.py +4 -0
  182. pythonlings/curriculum/checks/lists/lists1.py +2 -0
  183. pythonlings/curriculum/checks/lists/lists10.py +5 -0
  184. pythonlings/curriculum/checks/lists/lists2.py +3 -0
  185. pythonlings/curriculum/checks/lists/lists3.py +4 -0
  186. pythonlings/curriculum/checks/lists/lists4.py +3 -0
  187. pythonlings/curriculum/checks/lists/lists5.py +4 -0
  188. pythonlings/curriculum/checks/lists/lists6.py +3 -0
  189. pythonlings/curriculum/checks/lists/lists7.py +4 -0
  190. pythonlings/curriculum/checks/lists/lists8.py +7 -0
  191. pythonlings/curriculum/checks/lists/lists9.py +4 -0
  192. pythonlings/curriculum/checks/loops/loops1.py +2 -0
  193. pythonlings/curriculum/checks/loops/loops10.py +6 -0
  194. pythonlings/curriculum/checks/loops/loops2.py +2 -0
  195. pythonlings/curriculum/checks/loops/loops3.py +2 -0
  196. pythonlings/curriculum/checks/loops/loops4.py +3 -0
  197. pythonlings/curriculum/checks/loops/loops5.py +2 -0
  198. pythonlings/curriculum/checks/loops/loops6.py +2 -0
  199. pythonlings/curriculum/checks/loops/loops7.py +2 -0
  200. pythonlings/curriculum/checks/loops/loops8.py +2 -0
  201. pythonlings/curriculum/checks/loops/loops9.py +3 -0
  202. pythonlings/curriculum/checks/modules/modules1.py +2 -0
  203. pythonlings/curriculum/checks/modules/modules2.py +2 -0
  204. pythonlings/curriculum/checks/modules/modules3.py +5 -0
  205. pythonlings/curriculum/checks/modules/modules4.py +8 -0
  206. pythonlings/curriculum/checks/modules/modules5.py +7 -0
  207. pythonlings/curriculum/checks/modules/modules6.py +4 -0
  208. pythonlings/curriculum/checks/modules/modules7.py +4 -0
  209. pythonlings/curriculum/checks/modules/modules8.py +15 -0
  210. pythonlings/curriculum/checks/oop_advanced/oop_advanced1.py +4 -0
  211. pythonlings/curriculum/checks/oop_advanced/oop_advanced10.py +3 -0
  212. pythonlings/curriculum/checks/oop_advanced/oop_advanced11.py +3 -0
  213. pythonlings/curriculum/checks/oop_advanced/oop_advanced12.py +4 -0
  214. pythonlings/curriculum/checks/oop_advanced/oop_advanced2.py +4 -0
  215. pythonlings/curriculum/checks/oop_advanced/oop_advanced3.py +3 -0
  216. pythonlings/curriculum/checks/oop_advanced/oop_advanced4.py +3 -0
  217. pythonlings/curriculum/checks/oop_advanced/oop_advanced5.py +3 -0
  218. pythonlings/curriculum/checks/oop_advanced/oop_advanced6.py +2 -0
  219. pythonlings/curriculum/checks/oop_advanced/oop_advanced7.py +3 -0
  220. pythonlings/curriculum/checks/oop_advanced/oop_advanced8.py +3 -0
  221. pythonlings/curriculum/checks/oop_advanced/oop_advanced9.py +4 -0
  222. pythonlings/curriculum/checks/pathlib/pathlib1.py +5 -0
  223. pythonlings/curriculum/checks/pathlib/pathlib2.py +4 -0
  224. pythonlings/curriculum/checks/pathlib/pathlib3.py +6 -0
  225. pythonlings/curriculum/checks/pathlib/pathlib4.py +4 -0
  226. pythonlings/curriculum/checks/pathlib/pathlib5.py +4 -0
  227. pythonlings/curriculum/checks/pathlib/pathlib6.py +5 -0
  228. pythonlings/curriculum/checks/recursion/recursion1.py +5 -0
  229. pythonlings/curriculum/checks/recursion/recursion2.py +5 -0
  230. pythonlings/curriculum/checks/recursion/recursion3.py +6 -0
  231. pythonlings/curriculum/checks/recursion/recursion4.py +6 -0
  232. pythonlings/curriculum/checks/recursion/recursion5.py +7 -0
  233. pythonlings/curriculum/checks/recursion/recursion6.py +7 -0
  234. pythonlings/curriculum/checks/recursion/recursion7.py +7 -0
  235. pythonlings/curriculum/checks/recursion/recursion8.py +15 -0
  236. pythonlings/curriculum/checks/regex/regex1.py +3 -0
  237. pythonlings/curriculum/checks/regex/regex10.py +17 -0
  238. pythonlings/curriculum/checks/regex/regex2.py +3 -0
  239. pythonlings/curriculum/checks/regex/regex3.py +2 -0
  240. pythonlings/curriculum/checks/regex/regex4.py +4 -0
  241. pythonlings/curriculum/checks/regex/regex5.py +4 -0
  242. pythonlings/curriculum/checks/regex/regex6.py +6 -0
  243. pythonlings/curriculum/checks/regex/regex7.py +5 -0
  244. pythonlings/curriculum/checks/regex/regex8.py +6 -0
  245. pythonlings/curriculum/checks/regex/regex9.py +8 -0
  246. pythonlings/curriculum/checks/sets/sets1.py +3 -0
  247. pythonlings/curriculum/checks/sets/sets10.py +15 -0
  248. pythonlings/curriculum/checks/sets/sets2.py +5 -0
  249. pythonlings/curriculum/checks/sets/sets3.py +5 -0
  250. pythonlings/curriculum/checks/sets/sets4.py +3 -0
  251. pythonlings/curriculum/checks/sets/sets5.py +3 -0
  252. pythonlings/curriculum/checks/sets/sets6.py +3 -0
  253. pythonlings/curriculum/checks/sets/sets7.py +5 -0
  254. pythonlings/curriculum/checks/sets/sets8.py +5 -0
  255. pythonlings/curriculum/checks/sets/sets9.py +3 -0
  256. pythonlings/curriculum/checks/strings/strings1.py +3 -0
  257. pythonlings/curriculum/checks/strings/strings10.py +5 -0
  258. pythonlings/curriculum/checks/strings/strings2.py +3 -0
  259. pythonlings/curriculum/checks/strings/strings3.py +3 -0
  260. pythonlings/curriculum/checks/strings/strings4.py +2 -0
  261. pythonlings/curriculum/checks/strings/strings5.py +4 -0
  262. pythonlings/curriculum/checks/strings/strings6.py +3 -0
  263. pythonlings/curriculum/checks/strings/strings7.py +3 -0
  264. pythonlings/curriculum/checks/strings/strings8.py +3 -0
  265. pythonlings/curriculum/checks/strings/strings9.py +3 -0
  266. pythonlings/curriculum/checks/testing/testing1.py +2 -0
  267. pythonlings/curriculum/checks/testing/testing10.py +9 -0
  268. pythonlings/curriculum/checks/testing/testing11.py +7 -0
  269. pythonlings/curriculum/checks/testing/testing12.py +19 -0
  270. pythonlings/curriculum/checks/testing/testing2.py +2 -0
  271. pythonlings/curriculum/checks/testing/testing3.py +12 -0
  272. pythonlings/curriculum/checks/testing/testing4.py +6 -0
  273. pythonlings/curriculum/checks/testing/testing5.py +6 -0
  274. pythonlings/curriculum/checks/testing/testing6.py +14 -0
  275. pythonlings/curriculum/checks/testing/testing7.py +14 -0
  276. pythonlings/curriculum/checks/testing/testing8.py +27 -0
  277. pythonlings/curriculum/checks/testing/testing9.py +14 -0
  278. pythonlings/curriculum/checks/tuples/tuples1.py +3 -0
  279. pythonlings/curriculum/checks/tuples/tuples10.py +6 -0
  280. pythonlings/curriculum/checks/tuples/tuples2.py +3 -0
  281. pythonlings/curriculum/checks/tuples/tuples3.py +4 -0
  282. pythonlings/curriculum/checks/tuples/tuples4.py +3 -0
  283. pythonlings/curriculum/checks/tuples/tuples5.py +4 -0
  284. pythonlings/curriculum/checks/tuples/tuples6.py +5 -0
  285. pythonlings/curriculum/checks/tuples/tuples7.py +3 -0
  286. pythonlings/curriculum/checks/tuples/tuples8.py +4 -0
  287. pythonlings/curriculum/checks/tuples/tuples9.py +5 -0
  288. pythonlings/curriculum/checks/type_hints/type_hints1.py +3 -0
  289. pythonlings/curriculum/checks/type_hints/type_hints2.py +5 -0
  290. pythonlings/curriculum/checks/type_hints/type_hints3.py +5 -0
  291. pythonlings/curriculum/checks/type_hints/type_hints4.py +5 -0
  292. pythonlings/curriculum/checks/type_hints/type_hints5.py +6 -0
  293. pythonlings/curriculum/checks/type_hints/type_hints6.py +7 -0
  294. pythonlings/curriculum/checks/type_hints/type_hints7.py +9 -0
  295. pythonlings/curriculum/checks/type_hints/type_hints8.py +9 -0
  296. pythonlings/curriculum/checks/variables/variables1.py +7 -0
  297. pythonlings/curriculum/checks/variables/variables10.py +4 -0
  298. pythonlings/curriculum/checks/variables/variables2.py +19 -0
  299. pythonlings/curriculum/checks/variables/variables3.py +4 -0
  300. pythonlings/curriculum/checks/variables/variables4.py +2 -0
  301. pythonlings/curriculum/checks/variables/variables5.py +2 -0
  302. pythonlings/curriculum/checks/variables/variables6.py +4 -0
  303. pythonlings/curriculum/checks/variables/variables7.py +3 -0
  304. pythonlings/curriculum/checks/variables/variables8.py +4 -0
  305. pythonlings/curriculum/checks/variables/variables9.py +3 -0
  306. pythonlings/curriculum/exercises/async/async1.py +7 -0
  307. pythonlings/curriculum/exercises/async/async10.py +14 -0
  308. pythonlings/curriculum/exercises/async/async2.py +10 -0
  309. pythonlings/curriculum/exercises/async/async3.py +10 -0
  310. pythonlings/curriculum/exercises/async/async4.py +15 -0
  311. pythonlings/curriculum/exercises/async/async5.py +13 -0
  312. pythonlings/curriculum/exercises/async/async6.py +14 -0
  313. pythonlings/curriculum/exercises/async/async7.py +13 -0
  314. pythonlings/curriculum/exercises/async/async8.py +11 -0
  315. pythonlings/curriculum/exercises/async/async9.py +13 -0
  316. pythonlings/curriculum/exercises/classes/classes1.py +13 -0
  317. pythonlings/curriculum/exercises/classes/classes10.py +22 -0
  318. pythonlings/curriculum/exercises/classes/classes11.py +24 -0
  319. pythonlings/curriculum/exercises/classes/classes12.py +33 -0
  320. pythonlings/curriculum/exercises/classes/classes2.py +13 -0
  321. pythonlings/curriculum/exercises/classes/classes3.py +13 -0
  322. pythonlings/curriculum/exercises/classes/classes4.py +16 -0
  323. pythonlings/curriculum/exercises/classes/classes5.py +18 -0
  324. pythonlings/curriculum/exercises/classes/classes6.py +15 -0
  325. pythonlings/curriculum/exercises/classes/classes7.py +18 -0
  326. pythonlings/curriculum/exercises/classes/classes8.py +14 -0
  327. pythonlings/curriculum/exercises/classes/classes9.py +18 -0
  328. pythonlings/curriculum/exercises/collections/collections1.py +11 -0
  329. pythonlings/curriculum/exercises/collections/collections10.py +37 -0
  330. pythonlings/curriculum/exercises/collections/collections2.py +18 -0
  331. pythonlings/curriculum/exercises/collections/collections3.py +17 -0
  332. pythonlings/curriculum/exercises/collections/collections4.py +26 -0
  333. pythonlings/curriculum/exercises/collections/collections5.py +14 -0
  334. pythonlings/curriculum/exercises/collections/collections6.py +18 -0
  335. pythonlings/curriculum/exercises/collections/collections7.py +20 -0
  336. pythonlings/curriculum/exercises/collections/collections8.py +23 -0
  337. pythonlings/curriculum/exercises/collections/collections9.py +21 -0
  338. pythonlings/curriculum/exercises/comprehensions/comprehensions1.py +10 -0
  339. pythonlings/curriculum/exercises/comprehensions/comprehensions10.py +15 -0
  340. pythonlings/curriculum/exercises/comprehensions/comprehensions2.py +12 -0
  341. pythonlings/curriculum/exercises/comprehensions/comprehensions3.py +12 -0
  342. pythonlings/curriculum/exercises/comprehensions/comprehensions4.py +14 -0
  343. pythonlings/curriculum/exercises/comprehensions/comprehensions5.py +12 -0
  344. pythonlings/curriculum/exercises/comprehensions/comprehensions6.py +12 -0
  345. pythonlings/curriculum/exercises/comprehensions/comprehensions7.py +12 -0
  346. pythonlings/curriculum/exercises/comprehensions/comprehensions8.py +15 -0
  347. pythonlings/curriculum/exercises/comprehensions/comprehensions9.py +13 -0
  348. pythonlings/curriculum/exercises/conditionals/conditionals1.py +15 -0
  349. pythonlings/curriculum/exercises/conditionals/conditionals10.py +18 -0
  350. pythonlings/curriculum/exercises/conditionals/conditionals2.py +13 -0
  351. pythonlings/curriculum/exercises/conditionals/conditionals3.py +18 -0
  352. pythonlings/curriculum/exercises/conditionals/conditionals4.py +20 -0
  353. pythonlings/curriculum/exercises/conditionals/conditionals5.py +17 -0
  354. pythonlings/curriculum/exercises/conditionals/conditionals6.py +15 -0
  355. pythonlings/curriculum/exercises/conditionals/conditionals7.py +18 -0
  356. pythonlings/curriculum/exercises/conditionals/conditionals8.py +20 -0
  357. pythonlings/curriculum/exercises/conditionals/conditionals9.py +12 -0
  358. pythonlings/curriculum/exercises/context_managers/context_managers1.py +18 -0
  359. pythonlings/curriculum/exercises/context_managers/context_managers2.py +19 -0
  360. pythonlings/curriculum/exercises/context_managers/context_managers3.py +24 -0
  361. pythonlings/curriculum/exercises/context_managers/context_managers4.py +30 -0
  362. pythonlings/curriculum/exercises/context_managers/context_managers5.py +30 -0
  363. pythonlings/curriculum/exercises/context_managers/context_managers6.py +26 -0
  364. pythonlings/curriculum/exercises/context_managers/context_managers7.py +30 -0
  365. pythonlings/curriculum/exercises/context_managers/context_managers8.py +45 -0
  366. pythonlings/curriculum/exercises/dataclasses/dataclasses1.py +14 -0
  367. pythonlings/curriculum/exercises/dataclasses/dataclasses2.py +23 -0
  368. pythonlings/curriculum/exercises/dataclasses/dataclasses3.py +21 -0
  369. pythonlings/curriculum/exercises/dataclasses/dataclasses4.py +25 -0
  370. pythonlings/curriculum/exercises/dataclasses/dataclasses5.py +25 -0
  371. pythonlings/curriculum/exercises/dataclasses/dataclasses6.py +21 -0
  372. pythonlings/curriculum/exercises/dataclasses/dataclasses7.py +27 -0
  373. pythonlings/curriculum/exercises/dataclasses/dataclasses8.py +30 -0
  374. pythonlings/curriculum/exercises/datetime/datetime1.py +8 -0
  375. pythonlings/curriculum/exercises/datetime/datetime2.py +9 -0
  376. pythonlings/curriculum/exercises/datetime/datetime3.py +9 -0
  377. pythonlings/curriculum/exercises/datetime/datetime4.py +9 -0
  378. pythonlings/curriculum/exercises/datetime/datetime5.py +10 -0
  379. pythonlings/curriculum/exercises/datetime/datetime6.py +10 -0
  380. pythonlings/curriculum/exercises/datetime/datetime7.py +10 -0
  381. pythonlings/curriculum/exercises/datetime/datetime8.py +11 -0
  382. pythonlings/curriculum/exercises/decorators/decorators1.py +19 -0
  383. pythonlings/curriculum/exercises/decorators/decorators10.py +32 -0
  384. pythonlings/curriculum/exercises/decorators/decorators2.py +22 -0
  385. pythonlings/curriculum/exercises/decorators/decorators3.py +18 -0
  386. pythonlings/curriculum/exercises/decorators/decorators4.py +24 -0
  387. pythonlings/curriculum/exercises/decorators/decorators5.py +25 -0
  388. pythonlings/curriculum/exercises/decorators/decorators6.py +19 -0
  389. pythonlings/curriculum/exercises/decorators/decorators7.py +25 -0
  390. pythonlings/curriculum/exercises/decorators/decorators8.py +25 -0
  391. pythonlings/curriculum/exercises/decorators/decorators9.py +26 -0
  392. pythonlings/curriculum/exercises/dictionaries/dictionaries1.py +6 -0
  393. pythonlings/curriculum/exercises/dictionaries/dictionaries10.py +17 -0
  394. pythonlings/curriculum/exercises/dictionaries/dictionaries2.py +9 -0
  395. pythonlings/curriculum/exercises/dictionaries/dictionaries3.py +16 -0
  396. pythonlings/curriculum/exercises/dictionaries/dictionaries4.py +15 -0
  397. pythonlings/curriculum/exercises/dictionaries/dictionaries5.py +15 -0
  398. pythonlings/curriculum/exercises/dictionaries/dictionaries6.py +18 -0
  399. pythonlings/curriculum/exercises/dictionaries/dictionaries7.py +17 -0
  400. pythonlings/curriculum/exercises/dictionaries/dictionaries8.py +17 -0
  401. pythonlings/curriculum/exercises/dictionaries/dictionaries9.py +25 -0
  402. pythonlings/curriculum/exercises/enums/enums1.py +12 -0
  403. pythonlings/curriculum/exercises/enums/enums2.py +11 -0
  404. pythonlings/curriculum/exercises/enums/enums3.py +14 -0
  405. pythonlings/curriculum/exercises/enums/enums4.py +13 -0
  406. pythonlings/curriculum/exercises/enums/enums5.py +14 -0
  407. pythonlings/curriculum/exercises/enums/enums6.py +15 -0
  408. pythonlings/curriculum/exercises/exceptions/exceptions1.py +15 -0
  409. pythonlings/curriculum/exercises/exceptions/exceptions10.py +19 -0
  410. pythonlings/curriculum/exercises/exceptions/exceptions2.py +12 -0
  411. pythonlings/curriculum/exercises/exceptions/exceptions3.py +13 -0
  412. pythonlings/curriculum/exercises/exceptions/exceptions4.py +17 -0
  413. pythonlings/curriculum/exercises/exceptions/exceptions5.py +20 -0
  414. pythonlings/curriculum/exercises/exceptions/exceptions6.py +13 -0
  415. pythonlings/curriculum/exercises/exceptions/exceptions7.py +15 -0
  416. pythonlings/curriculum/exercises/exceptions/exceptions8.py +17 -0
  417. pythonlings/curriculum/exercises/exceptions/exceptions9.py +20 -0
  418. pythonlings/curriculum/exercises/file_io/file_io1.py +18 -0
  419. pythonlings/curriculum/exercises/file_io/file_io10.py +25 -0
  420. pythonlings/curriculum/exercises/file_io/file_io2.py +16 -0
  421. pythonlings/curriculum/exercises/file_io/file_io3.py +18 -0
  422. pythonlings/curriculum/exercises/file_io/file_io4.py +21 -0
  423. pythonlings/curriculum/exercises/file_io/file_io5.py +19 -0
  424. pythonlings/curriculum/exercises/file_io/file_io6.py +22 -0
  425. pythonlings/curriculum/exercises/file_io/file_io7.py +20 -0
  426. pythonlings/curriculum/exercises/file_io/file_io8.py +18 -0
  427. pythonlings/curriculum/exercises/file_io/file_io9.py +19 -0
  428. pythonlings/curriculum/exercises/functional/functional1.py +7 -0
  429. pythonlings/curriculum/exercises/functional/functional10.py +19 -0
  430. pythonlings/curriculum/exercises/functional/functional2.py +8 -0
  431. pythonlings/curriculum/exercises/functional/functional3.py +11 -0
  432. pythonlings/curriculum/exercises/functional/functional4.py +11 -0
  433. pythonlings/curriculum/exercises/functional/functional5.py +11 -0
  434. pythonlings/curriculum/exercises/functional/functional6.py +14 -0
  435. pythonlings/curriculum/exercises/functional/functional7.py +12 -0
  436. pythonlings/curriculum/exercises/functional/functional8.py +13 -0
  437. pythonlings/curriculum/exercises/functional/functional9.py +15 -0
  438. pythonlings/curriculum/exercises/functions/functions1.py +8 -0
  439. pythonlings/curriculum/exercises/functions/functions10.py +19 -0
  440. pythonlings/curriculum/exercises/functions/functions2.py +9 -0
  441. pythonlings/curriculum/exercises/functions/functions3.py +8 -0
  442. pythonlings/curriculum/exercises/functions/functions4.py +8 -0
  443. pythonlings/curriculum/exercises/functions/functions5.py +11 -0
  444. pythonlings/curriculum/exercises/functions/functions6.py +16 -0
  445. pythonlings/curriculum/exercises/functions/functions7.py +11 -0
  446. pythonlings/curriculum/exercises/functions/functions8.py +10 -0
  447. pythonlings/curriculum/exercises/functions/functions9.py +16 -0
  448. pythonlings/curriculum/exercises/generators/generators1.py +13 -0
  449. pythonlings/curriculum/exercises/generators/generators10.py +16 -0
  450. pythonlings/curriculum/exercises/generators/generators2.py +17 -0
  451. pythonlings/curriculum/exercises/generators/generators3.py +19 -0
  452. pythonlings/curriculum/exercises/generators/generators4.py +12 -0
  453. pythonlings/curriculum/exercises/generators/generators5.py +24 -0
  454. pythonlings/curriculum/exercises/generators/generators6.py +20 -0
  455. pythonlings/curriculum/exercises/generators/generators7.py +14 -0
  456. pythonlings/curriculum/exercises/generators/generators8.py +17 -0
  457. pythonlings/curriculum/exercises/generators/generators9.py +26 -0
  458. pythonlings/curriculum/exercises/itertools/itertools1.py +10 -0
  459. pythonlings/curriculum/exercises/itertools/itertools2.py +8 -0
  460. pythonlings/curriculum/exercises/itertools/itertools3.py +10 -0
  461. pythonlings/curriculum/exercises/itertools/itertools4.py +12 -0
  462. pythonlings/curriculum/exercises/itertools/itertools5.py +9 -0
  463. pythonlings/curriculum/exercises/itertools/itertools6.py +9 -0
  464. pythonlings/curriculum/exercises/itertools/itertools7.py +10 -0
  465. pythonlings/curriculum/exercises/itertools/itertools8.py +18 -0
  466. pythonlings/curriculum/exercises/json/json1.py +10 -0
  467. pythonlings/curriculum/exercises/json/json2.py +9 -0
  468. pythonlings/curriculum/exercises/json/json3.py +10 -0
  469. pythonlings/curriculum/exercises/json/json4.py +13 -0
  470. pythonlings/curriculum/exercises/json/json5.py +9 -0
  471. pythonlings/curriculum/exercises/json/json6.py +10 -0
  472. pythonlings/curriculum/exercises/json/json7.py +10 -0
  473. pythonlings/curriculum/exercises/json/json8.py +12 -0
  474. pythonlings/curriculum/exercises/lists/lists1.py +7 -0
  475. pythonlings/curriculum/exercises/lists/lists10.py +28 -0
  476. pythonlings/curriculum/exercises/lists/lists2.py +13 -0
  477. pythonlings/curriculum/exercises/lists/lists3.py +16 -0
  478. pythonlings/curriculum/exercises/lists/lists4.py +16 -0
  479. pythonlings/curriculum/exercises/lists/lists5.py +16 -0
  480. pythonlings/curriculum/exercises/lists/lists6.py +15 -0
  481. pythonlings/curriculum/exercises/lists/lists7.py +13 -0
  482. pythonlings/curriculum/exercises/lists/lists8.py +15 -0
  483. pythonlings/curriculum/exercises/lists/lists9.py +19 -0
  484. pythonlings/curriculum/exercises/loops/loops1.py +8 -0
  485. pythonlings/curriculum/exercises/loops/loops10.py +22 -0
  486. pythonlings/curriculum/exercises/loops/loops2.py +10 -0
  487. pythonlings/curriculum/exercises/loops/loops3.py +10 -0
  488. pythonlings/curriculum/exercises/loops/loops4.py +12 -0
  489. pythonlings/curriculum/exercises/loops/loops5.py +13 -0
  490. pythonlings/curriculum/exercises/loops/loops6.py +10 -0
  491. pythonlings/curriculum/exercises/loops/loops7.py +13 -0
  492. pythonlings/curriculum/exercises/loops/loops8.py +11 -0
  493. pythonlings/curriculum/exercises/loops/loops9.py +11 -0
  494. pythonlings/curriculum/exercises/modules/modules1.py +10 -0
  495. pythonlings/curriculum/exercises/modules/modules2.py +10 -0
  496. pythonlings/curriculum/exercises/modules/modules3.py +13 -0
  497. pythonlings/curriculum/exercises/modules/modules4.py +18 -0
  498. pythonlings/curriculum/exercises/modules/modules5.py +17 -0
  499. pythonlings/curriculum/exercises/modules/modules6.py +12 -0
  500. pythonlings/curriculum/exercises/modules/modules7.py +16 -0
  501. pythonlings/curriculum/exercises/modules/modules8.py +23 -0
  502. pythonlings/curriculum/exercises/oop_advanced/oop_advanced1.py +11 -0
  503. pythonlings/curriculum/exercises/oop_advanced/oop_advanced10.py +18 -0
  504. pythonlings/curriculum/exercises/oop_advanced/oop_advanced11.py +13 -0
  505. pythonlings/curriculum/exercises/oop_advanced/oop_advanced12.py +12 -0
  506. pythonlings/curriculum/exercises/oop_advanced/oop_advanced2.py +13 -0
  507. pythonlings/curriculum/exercises/oop_advanced/oop_advanced3.py +22 -0
  508. pythonlings/curriculum/exercises/oop_advanced/oop_advanced4.py +12 -0
  509. pythonlings/curriculum/exercises/oop_advanced/oop_advanced5.py +11 -0
  510. pythonlings/curriculum/exercises/oop_advanced/oop_advanced6.py +12 -0
  511. pythonlings/curriculum/exercises/oop_advanced/oop_advanced7.py +14 -0
  512. pythonlings/curriculum/exercises/oop_advanced/oop_advanced8.py +14 -0
  513. pythonlings/curriculum/exercises/oop_advanced/oop_advanced9.py +9 -0
  514. pythonlings/curriculum/exercises/pathlib/pathlib1.py +9 -0
  515. pythonlings/curriculum/exercises/pathlib/pathlib2.py +9 -0
  516. pythonlings/curriculum/exercises/pathlib/pathlib3.py +11 -0
  517. pythonlings/curriculum/exercises/pathlib/pathlib4.py +9 -0
  518. pythonlings/curriculum/exercises/pathlib/pathlib5.py +9 -0
  519. pythonlings/curriculum/exercises/pathlib/pathlib6.py +10 -0
  520. pythonlings/curriculum/exercises/recursion/recursion1.py +12 -0
  521. pythonlings/curriculum/exercises/recursion/recursion2.py +12 -0
  522. pythonlings/curriculum/exercises/recursion/recursion3.py +12 -0
  523. pythonlings/curriculum/exercises/recursion/recursion4.py +12 -0
  524. pythonlings/curriculum/exercises/recursion/recursion5.py +14 -0
  525. pythonlings/curriculum/exercises/recursion/recursion6.py +13 -0
  526. pythonlings/curriculum/exercises/recursion/recursion7.py +20 -0
  527. pythonlings/curriculum/exercises/recursion/recursion8.py +27 -0
  528. pythonlings/curriculum/exercises/regex/regex1.py +16 -0
  529. pythonlings/curriculum/exercises/regex/regex10.py +31 -0
  530. pythonlings/curriculum/exercises/regex/regex2.py +16 -0
  531. pythonlings/curriculum/exercises/regex/regex3.py +16 -0
  532. pythonlings/curriculum/exercises/regex/regex4.py +19 -0
  533. pythonlings/curriculum/exercises/regex/regex5.py +19 -0
  534. pythonlings/curriculum/exercises/regex/regex6.py +23 -0
  535. pythonlings/curriculum/exercises/regex/regex7.py +24 -0
  536. pythonlings/curriculum/exercises/regex/regex8.py +19 -0
  537. pythonlings/curriculum/exercises/regex/regex9.py +22 -0
  538. pythonlings/curriculum/exercises/sets/sets1.py +6 -0
  539. pythonlings/curriculum/exercises/sets/sets10.py +21 -0
  540. pythonlings/curriculum/exercises/sets/sets2.py +12 -0
  541. pythonlings/curriculum/exercises/sets/sets3.py +15 -0
  542. pythonlings/curriculum/exercises/sets/sets4.py +14 -0
  543. pythonlings/curriculum/exercises/sets/sets5.py +14 -0
  544. pythonlings/curriculum/exercises/sets/sets6.py +14 -0
  545. pythonlings/curriculum/exercises/sets/sets7.py +16 -0
  546. pythonlings/curriculum/exercises/sets/sets8.py +16 -0
  547. pythonlings/curriculum/exercises/sets/sets9.py +15 -0
  548. pythonlings/curriculum/exercises/strings/strings1.py +6 -0
  549. pythonlings/curriculum/exercises/strings/strings10.py +11 -0
  550. pythonlings/curriculum/exercises/strings/strings2.py +9 -0
  551. pythonlings/curriculum/exercises/strings/strings3.py +9 -0
  552. pythonlings/curriculum/exercises/strings/strings4.py +8 -0
  553. pythonlings/curriculum/exercises/strings/strings5.py +10 -0
  554. pythonlings/curriculum/exercises/strings/strings6.py +10 -0
  555. pythonlings/curriculum/exercises/strings/strings7.py +10 -0
  556. pythonlings/curriculum/exercises/strings/strings8.py +9 -0
  557. pythonlings/curriculum/exercises/strings/strings9.py +10 -0
  558. pythonlings/curriculum/exercises/testing/testing1.py +16 -0
  559. pythonlings/curriculum/exercises/testing/testing10.py +21 -0
  560. pythonlings/curriculum/exercises/testing/testing11.py +27 -0
  561. pythonlings/curriculum/exercises/testing/testing12.py +51 -0
  562. pythonlings/curriculum/exercises/testing/testing2.py +15 -0
  563. pythonlings/curriculum/exercises/testing/testing3.py +19 -0
  564. pythonlings/curriculum/exercises/testing/testing4.py +19 -0
  565. pythonlings/curriculum/exercises/testing/testing5.py +18 -0
  566. pythonlings/curriculum/exercises/testing/testing6.py +27 -0
  567. pythonlings/curriculum/exercises/testing/testing7.py +27 -0
  568. pythonlings/curriculum/exercises/testing/testing8.py +29 -0
  569. pythonlings/curriculum/exercises/testing/testing9.py +30 -0
  570. pythonlings/curriculum/exercises/tuples/tuples1.py +7 -0
  571. pythonlings/curriculum/exercises/tuples/tuples10.py +26 -0
  572. pythonlings/curriculum/exercises/tuples/tuples2.py +11 -0
  573. pythonlings/curriculum/exercises/tuples/tuples3.py +9 -0
  574. pythonlings/curriculum/exercises/tuples/tuples4.py +8 -0
  575. pythonlings/curriculum/exercises/tuples/tuples5.py +12 -0
  576. pythonlings/curriculum/exercises/tuples/tuples6.py +15 -0
  577. pythonlings/curriculum/exercises/tuples/tuples7.py +14 -0
  578. pythonlings/curriculum/exercises/tuples/tuples8.py +13 -0
  579. pythonlings/curriculum/exercises/tuples/tuples9.py +18 -0
  580. pythonlings/curriculum/exercises/type_hints/type_hints1.py +9 -0
  581. pythonlings/curriculum/exercises/type_hints/type_hints2.py +13 -0
  582. pythonlings/curriculum/exercises/type_hints/type_hints3.py +13 -0
  583. pythonlings/curriculum/exercises/type_hints/type_hints4.py +21 -0
  584. pythonlings/curriculum/exercises/type_hints/type_hints5.py +15 -0
  585. pythonlings/curriculum/exercises/type_hints/type_hints6.py +16 -0
  586. pythonlings/curriculum/exercises/type_hints/type_hints7.py +19 -0
  587. pythonlings/curriculum/exercises/type_hints/type_hints8.py +27 -0
  588. pythonlings/curriculum/exercises/variables/variables1.py +10 -0
  589. pythonlings/curriculum/exercises/variables/variables10.py +14 -0
  590. pythonlings/curriculum/exercises/variables/variables2.py +11 -0
  591. pythonlings/curriculum/exercises/variables/variables3.py +11 -0
  592. pythonlings/curriculum/exercises/variables/variables4.py +9 -0
  593. pythonlings/curriculum/exercises/variables/variables5.py +11 -0
  594. pythonlings/curriculum/exercises/variables/variables6.py +9 -0
  595. pythonlings/curriculum/exercises/variables/variables7.py +10 -0
  596. pythonlings/curriculum/exercises/variables/variables8.py +12 -0
  597. pythonlings/curriculum/exercises/variables/variables9.py +10 -0
  598. pythonlings/curriculum/info.toml +1755 -0
  599. pythonlings/curriculum/solutions/.keep +1 -0
  600. pythonlings/curriculum/solutions/_answers.py +1654 -0
  601. pythonlings/curriculum/solutions/async1.py +2 -0
  602. pythonlings/curriculum/solutions/async10.py +2 -0
  603. pythonlings/curriculum/solutions/async2.py +2 -0
  604. pythonlings/curriculum/solutions/async3.py +2 -0
  605. pythonlings/curriculum/solutions/async4.py +2 -0
  606. pythonlings/curriculum/solutions/async5.py +2 -0
  607. pythonlings/curriculum/solutions/async6.py +2 -0
  608. pythonlings/curriculum/solutions/async7.py +2 -0
  609. pythonlings/curriculum/solutions/async8.py +2 -0
  610. pythonlings/curriculum/solutions/async9.py +2 -0
  611. pythonlings/curriculum/solutions/classes1.py +2 -0
  612. pythonlings/curriculum/solutions/classes10.py +2 -0
  613. pythonlings/curriculum/solutions/classes11.py +2 -0
  614. pythonlings/curriculum/solutions/classes12.py +2 -0
  615. pythonlings/curriculum/solutions/classes2.py +2 -0
  616. pythonlings/curriculum/solutions/classes3.py +2 -0
  617. pythonlings/curriculum/solutions/classes4.py +2 -0
  618. pythonlings/curriculum/solutions/classes5.py +2 -0
  619. pythonlings/curriculum/solutions/classes6.py +2 -0
  620. pythonlings/curriculum/solutions/classes7.py +2 -0
  621. pythonlings/curriculum/solutions/classes8.py +2 -0
  622. pythonlings/curriculum/solutions/classes9.py +2 -0
  623. pythonlings/curriculum/solutions/collections1.py +2 -0
  624. pythonlings/curriculum/solutions/collections10.py +2 -0
  625. pythonlings/curriculum/solutions/collections2.py +2 -0
  626. pythonlings/curriculum/solutions/collections3.py +2 -0
  627. pythonlings/curriculum/solutions/collections4.py +2 -0
  628. pythonlings/curriculum/solutions/collections5.py +2 -0
  629. pythonlings/curriculum/solutions/collections6.py +2 -0
  630. pythonlings/curriculum/solutions/collections7.py +2 -0
  631. pythonlings/curriculum/solutions/collections8.py +2 -0
  632. pythonlings/curriculum/solutions/collections9.py +2 -0
  633. pythonlings/curriculum/solutions/comprehensions1.py +2 -0
  634. pythonlings/curriculum/solutions/comprehensions10.py +2 -0
  635. pythonlings/curriculum/solutions/comprehensions2.py +2 -0
  636. pythonlings/curriculum/solutions/comprehensions3.py +2 -0
  637. pythonlings/curriculum/solutions/comprehensions4.py +2 -0
  638. pythonlings/curriculum/solutions/comprehensions5.py +2 -0
  639. pythonlings/curriculum/solutions/comprehensions6.py +2 -0
  640. pythonlings/curriculum/solutions/comprehensions7.py +2 -0
  641. pythonlings/curriculum/solutions/comprehensions8.py +2 -0
  642. pythonlings/curriculum/solutions/comprehensions9.py +2 -0
  643. pythonlings/curriculum/solutions/conditionals1.py +2 -0
  644. pythonlings/curriculum/solutions/conditionals10.py +2 -0
  645. pythonlings/curriculum/solutions/conditionals2.py +2 -0
  646. pythonlings/curriculum/solutions/conditionals3.py +2 -0
  647. pythonlings/curriculum/solutions/conditionals4.py +2 -0
  648. pythonlings/curriculum/solutions/conditionals5.py +2 -0
  649. pythonlings/curriculum/solutions/conditionals6.py +2 -0
  650. pythonlings/curriculum/solutions/conditionals7.py +2 -0
  651. pythonlings/curriculum/solutions/conditionals8.py +2 -0
  652. pythonlings/curriculum/solutions/conditionals9.py +2 -0
  653. pythonlings/curriculum/solutions/context_managers1.py +2 -0
  654. pythonlings/curriculum/solutions/context_managers2.py +2 -0
  655. pythonlings/curriculum/solutions/context_managers3.py +2 -0
  656. pythonlings/curriculum/solutions/context_managers4.py +2 -0
  657. pythonlings/curriculum/solutions/context_managers5.py +2 -0
  658. pythonlings/curriculum/solutions/context_managers6.py +2 -0
  659. pythonlings/curriculum/solutions/context_managers7.py +2 -0
  660. pythonlings/curriculum/solutions/context_managers8.py +2 -0
  661. pythonlings/curriculum/solutions/dataclasses1.py +2 -0
  662. pythonlings/curriculum/solutions/dataclasses2.py +2 -0
  663. pythonlings/curriculum/solutions/dataclasses3.py +2 -0
  664. pythonlings/curriculum/solutions/dataclasses4.py +2 -0
  665. pythonlings/curriculum/solutions/dataclasses5.py +2 -0
  666. pythonlings/curriculum/solutions/dataclasses6.py +2 -0
  667. pythonlings/curriculum/solutions/dataclasses7.py +2 -0
  668. pythonlings/curriculum/solutions/dataclasses8.py +2 -0
  669. pythonlings/curriculum/solutions/datetime1.py +2 -0
  670. pythonlings/curriculum/solutions/datetime2.py +2 -0
  671. pythonlings/curriculum/solutions/datetime3.py +2 -0
  672. pythonlings/curriculum/solutions/datetime4.py +2 -0
  673. pythonlings/curriculum/solutions/datetime5.py +2 -0
  674. pythonlings/curriculum/solutions/datetime6.py +2 -0
  675. pythonlings/curriculum/solutions/datetime7.py +2 -0
  676. pythonlings/curriculum/solutions/datetime8.py +2 -0
  677. pythonlings/curriculum/solutions/decorators1.py +2 -0
  678. pythonlings/curriculum/solutions/decorators10.py +2 -0
  679. pythonlings/curriculum/solutions/decorators2.py +2 -0
  680. pythonlings/curriculum/solutions/decorators3.py +2 -0
  681. pythonlings/curriculum/solutions/decorators4.py +2 -0
  682. pythonlings/curriculum/solutions/decorators5.py +2 -0
  683. pythonlings/curriculum/solutions/decorators6.py +2 -0
  684. pythonlings/curriculum/solutions/decorators7.py +2 -0
  685. pythonlings/curriculum/solutions/decorators8.py +2 -0
  686. pythonlings/curriculum/solutions/decorators9.py +2 -0
  687. pythonlings/curriculum/solutions/dictionaries1.py +2 -0
  688. pythonlings/curriculum/solutions/dictionaries10.py +2 -0
  689. pythonlings/curriculum/solutions/dictionaries2.py +2 -0
  690. pythonlings/curriculum/solutions/dictionaries3.py +2 -0
  691. pythonlings/curriculum/solutions/dictionaries4.py +2 -0
  692. pythonlings/curriculum/solutions/dictionaries5.py +2 -0
  693. pythonlings/curriculum/solutions/dictionaries6.py +2 -0
  694. pythonlings/curriculum/solutions/dictionaries7.py +2 -0
  695. pythonlings/curriculum/solutions/dictionaries8.py +2 -0
  696. pythonlings/curriculum/solutions/dictionaries9.py +2 -0
  697. pythonlings/curriculum/solutions/enums1.py +2 -0
  698. pythonlings/curriculum/solutions/enums2.py +2 -0
  699. pythonlings/curriculum/solutions/enums3.py +2 -0
  700. pythonlings/curriculum/solutions/enums4.py +2 -0
  701. pythonlings/curriculum/solutions/enums5.py +2 -0
  702. pythonlings/curriculum/solutions/enums6.py +2 -0
  703. pythonlings/curriculum/solutions/exceptions1.py +2 -0
  704. pythonlings/curriculum/solutions/exceptions10.py +2 -0
  705. pythonlings/curriculum/solutions/exceptions2.py +2 -0
  706. pythonlings/curriculum/solutions/exceptions3.py +2 -0
  707. pythonlings/curriculum/solutions/exceptions4.py +2 -0
  708. pythonlings/curriculum/solutions/exceptions5.py +2 -0
  709. pythonlings/curriculum/solutions/exceptions6.py +2 -0
  710. pythonlings/curriculum/solutions/exceptions7.py +2 -0
  711. pythonlings/curriculum/solutions/exceptions8.py +2 -0
  712. pythonlings/curriculum/solutions/exceptions9.py +2 -0
  713. pythonlings/curriculum/solutions/file_io1.py +2 -0
  714. pythonlings/curriculum/solutions/file_io10.py +2 -0
  715. pythonlings/curriculum/solutions/file_io2.py +2 -0
  716. pythonlings/curriculum/solutions/file_io3.py +2 -0
  717. pythonlings/curriculum/solutions/file_io4.py +2 -0
  718. pythonlings/curriculum/solutions/file_io5.py +2 -0
  719. pythonlings/curriculum/solutions/file_io6.py +2 -0
  720. pythonlings/curriculum/solutions/file_io7.py +2 -0
  721. pythonlings/curriculum/solutions/file_io8.py +2 -0
  722. pythonlings/curriculum/solutions/file_io9.py +2 -0
  723. pythonlings/curriculum/solutions/functional1.py +2 -0
  724. pythonlings/curriculum/solutions/functional10.py +2 -0
  725. pythonlings/curriculum/solutions/functional2.py +2 -0
  726. pythonlings/curriculum/solutions/functional3.py +2 -0
  727. pythonlings/curriculum/solutions/functional4.py +2 -0
  728. pythonlings/curriculum/solutions/functional5.py +2 -0
  729. pythonlings/curriculum/solutions/functional6.py +2 -0
  730. pythonlings/curriculum/solutions/functional7.py +2 -0
  731. pythonlings/curriculum/solutions/functional8.py +2 -0
  732. pythonlings/curriculum/solutions/functional9.py +2 -0
  733. pythonlings/curriculum/solutions/functions1.py +2 -0
  734. pythonlings/curriculum/solutions/functions10.py +2 -0
  735. pythonlings/curriculum/solutions/functions2.py +2 -0
  736. pythonlings/curriculum/solutions/functions3.py +2 -0
  737. pythonlings/curriculum/solutions/functions4.py +2 -0
  738. pythonlings/curriculum/solutions/functions5.py +2 -0
  739. pythonlings/curriculum/solutions/functions6.py +2 -0
  740. pythonlings/curriculum/solutions/functions7.py +2 -0
  741. pythonlings/curriculum/solutions/functions8.py +2 -0
  742. pythonlings/curriculum/solutions/functions9.py +2 -0
  743. pythonlings/curriculum/solutions/generators1.py +2 -0
  744. pythonlings/curriculum/solutions/generators10.py +2 -0
  745. pythonlings/curriculum/solutions/generators2.py +2 -0
  746. pythonlings/curriculum/solutions/generators3.py +2 -0
  747. pythonlings/curriculum/solutions/generators4.py +2 -0
  748. pythonlings/curriculum/solutions/generators5.py +2 -0
  749. pythonlings/curriculum/solutions/generators6.py +2 -0
  750. pythonlings/curriculum/solutions/generators7.py +2 -0
  751. pythonlings/curriculum/solutions/generators8.py +2 -0
  752. pythonlings/curriculum/solutions/generators9.py +2 -0
  753. pythonlings/curriculum/solutions/itertools1.py +2 -0
  754. pythonlings/curriculum/solutions/itertools2.py +2 -0
  755. pythonlings/curriculum/solutions/itertools3.py +2 -0
  756. pythonlings/curriculum/solutions/itertools4.py +2 -0
  757. pythonlings/curriculum/solutions/itertools5.py +2 -0
  758. pythonlings/curriculum/solutions/itertools6.py +2 -0
  759. pythonlings/curriculum/solutions/itertools7.py +2 -0
  760. pythonlings/curriculum/solutions/itertools8.py +2 -0
  761. pythonlings/curriculum/solutions/json1.py +2 -0
  762. pythonlings/curriculum/solutions/json2.py +2 -0
  763. pythonlings/curriculum/solutions/json3.py +2 -0
  764. pythonlings/curriculum/solutions/json4.py +2 -0
  765. pythonlings/curriculum/solutions/json5.py +2 -0
  766. pythonlings/curriculum/solutions/json6.py +2 -0
  767. pythonlings/curriculum/solutions/json7.py +2 -0
  768. pythonlings/curriculum/solutions/json8.py +2 -0
  769. pythonlings/curriculum/solutions/lists1.py +2 -0
  770. pythonlings/curriculum/solutions/lists10.py +2 -0
  771. pythonlings/curriculum/solutions/lists2.py +2 -0
  772. pythonlings/curriculum/solutions/lists3.py +2 -0
  773. pythonlings/curriculum/solutions/lists4.py +2 -0
  774. pythonlings/curriculum/solutions/lists5.py +2 -0
  775. pythonlings/curriculum/solutions/lists6.py +2 -0
  776. pythonlings/curriculum/solutions/lists7.py +2 -0
  777. pythonlings/curriculum/solutions/lists8.py +2 -0
  778. pythonlings/curriculum/solutions/lists9.py +2 -0
  779. pythonlings/curriculum/solutions/loops1.py +2 -0
  780. pythonlings/curriculum/solutions/loops10.py +2 -0
  781. pythonlings/curriculum/solutions/loops2.py +2 -0
  782. pythonlings/curriculum/solutions/loops3.py +2 -0
  783. pythonlings/curriculum/solutions/loops4.py +2 -0
  784. pythonlings/curriculum/solutions/loops5.py +2 -0
  785. pythonlings/curriculum/solutions/loops6.py +2 -0
  786. pythonlings/curriculum/solutions/loops7.py +2 -0
  787. pythonlings/curriculum/solutions/loops8.py +2 -0
  788. pythonlings/curriculum/solutions/loops9.py +2 -0
  789. pythonlings/curriculum/solutions/modules1.py +2 -0
  790. pythonlings/curriculum/solutions/modules2.py +2 -0
  791. pythonlings/curriculum/solutions/modules3.py +2 -0
  792. pythonlings/curriculum/solutions/modules4.py +2 -0
  793. pythonlings/curriculum/solutions/modules5.py +2 -0
  794. pythonlings/curriculum/solutions/modules6.py +2 -0
  795. pythonlings/curriculum/solutions/modules7.py +2 -0
  796. pythonlings/curriculum/solutions/modules8.py +2 -0
  797. pythonlings/curriculum/solutions/oop_advanced1.py +2 -0
  798. pythonlings/curriculum/solutions/oop_advanced10.py +2 -0
  799. pythonlings/curriculum/solutions/oop_advanced11.py +2 -0
  800. pythonlings/curriculum/solutions/oop_advanced12.py +2 -0
  801. pythonlings/curriculum/solutions/oop_advanced2.py +2 -0
  802. pythonlings/curriculum/solutions/oop_advanced3.py +2 -0
  803. pythonlings/curriculum/solutions/oop_advanced4.py +2 -0
  804. pythonlings/curriculum/solutions/oop_advanced5.py +2 -0
  805. pythonlings/curriculum/solutions/oop_advanced6.py +2 -0
  806. pythonlings/curriculum/solutions/oop_advanced7.py +2 -0
  807. pythonlings/curriculum/solutions/oop_advanced8.py +2 -0
  808. pythonlings/curriculum/solutions/oop_advanced9.py +2 -0
  809. pythonlings/curriculum/solutions/pathlib1.py +2 -0
  810. pythonlings/curriculum/solutions/pathlib2.py +2 -0
  811. pythonlings/curriculum/solutions/pathlib3.py +2 -0
  812. pythonlings/curriculum/solutions/pathlib4.py +2 -0
  813. pythonlings/curriculum/solutions/pathlib5.py +2 -0
  814. pythonlings/curriculum/solutions/pathlib6.py +2 -0
  815. pythonlings/curriculum/solutions/recursion1.py +2 -0
  816. pythonlings/curriculum/solutions/recursion2.py +2 -0
  817. pythonlings/curriculum/solutions/recursion3.py +2 -0
  818. pythonlings/curriculum/solutions/recursion4.py +2 -0
  819. pythonlings/curriculum/solutions/recursion5.py +2 -0
  820. pythonlings/curriculum/solutions/recursion6.py +2 -0
  821. pythonlings/curriculum/solutions/recursion7.py +2 -0
  822. pythonlings/curriculum/solutions/recursion8.py +2 -0
  823. pythonlings/curriculum/solutions/regex1.py +2 -0
  824. pythonlings/curriculum/solutions/regex10.py +2 -0
  825. pythonlings/curriculum/solutions/regex2.py +2 -0
  826. pythonlings/curriculum/solutions/regex3.py +2 -0
  827. pythonlings/curriculum/solutions/regex4.py +2 -0
  828. pythonlings/curriculum/solutions/regex5.py +2 -0
  829. pythonlings/curriculum/solutions/regex6.py +2 -0
  830. pythonlings/curriculum/solutions/regex7.py +2 -0
  831. pythonlings/curriculum/solutions/regex8.py +2 -0
  832. pythonlings/curriculum/solutions/regex9.py +2 -0
  833. pythonlings/curriculum/solutions/sets1.py +2 -0
  834. pythonlings/curriculum/solutions/sets10.py +2 -0
  835. pythonlings/curriculum/solutions/sets2.py +2 -0
  836. pythonlings/curriculum/solutions/sets3.py +2 -0
  837. pythonlings/curriculum/solutions/sets4.py +2 -0
  838. pythonlings/curriculum/solutions/sets5.py +2 -0
  839. pythonlings/curriculum/solutions/sets6.py +2 -0
  840. pythonlings/curriculum/solutions/sets7.py +2 -0
  841. pythonlings/curriculum/solutions/sets8.py +2 -0
  842. pythonlings/curriculum/solutions/sets9.py +2 -0
  843. pythonlings/curriculum/solutions/strings1.py +2 -0
  844. pythonlings/curriculum/solutions/strings10.py +2 -0
  845. pythonlings/curriculum/solutions/strings2.py +2 -0
  846. pythonlings/curriculum/solutions/strings3.py +2 -0
  847. pythonlings/curriculum/solutions/strings4.py +2 -0
  848. pythonlings/curriculum/solutions/strings5.py +2 -0
  849. pythonlings/curriculum/solutions/strings6.py +2 -0
  850. pythonlings/curriculum/solutions/strings7.py +2 -0
  851. pythonlings/curriculum/solutions/strings8.py +2 -0
  852. pythonlings/curriculum/solutions/strings9.py +2 -0
  853. pythonlings/curriculum/solutions/testing1.py +2 -0
  854. pythonlings/curriculum/solutions/testing10.py +2 -0
  855. pythonlings/curriculum/solutions/testing11.py +2 -0
  856. pythonlings/curriculum/solutions/testing12.py +2 -0
  857. pythonlings/curriculum/solutions/testing2.py +2 -0
  858. pythonlings/curriculum/solutions/testing3.py +2 -0
  859. pythonlings/curriculum/solutions/testing4.py +2 -0
  860. pythonlings/curriculum/solutions/testing5.py +2 -0
  861. pythonlings/curriculum/solutions/testing6.py +2 -0
  862. pythonlings/curriculum/solutions/testing7.py +2 -0
  863. pythonlings/curriculum/solutions/testing8.py +2 -0
  864. pythonlings/curriculum/solutions/testing9.py +2 -0
  865. pythonlings/curriculum/solutions/tuples1.py +2 -0
  866. pythonlings/curriculum/solutions/tuples10.py +2 -0
  867. pythonlings/curriculum/solutions/tuples2.py +2 -0
  868. pythonlings/curriculum/solutions/tuples3.py +2 -0
  869. pythonlings/curriculum/solutions/tuples4.py +2 -0
  870. pythonlings/curriculum/solutions/tuples5.py +2 -0
  871. pythonlings/curriculum/solutions/tuples6.py +2 -0
  872. pythonlings/curriculum/solutions/tuples7.py +2 -0
  873. pythonlings/curriculum/solutions/tuples8.py +2 -0
  874. pythonlings/curriculum/solutions/tuples9.py +2 -0
  875. pythonlings/curriculum/solutions/type_hints1.py +2 -0
  876. pythonlings/curriculum/solutions/type_hints2.py +2 -0
  877. pythonlings/curriculum/solutions/type_hints3.py +2 -0
  878. pythonlings/curriculum/solutions/type_hints4.py +2 -0
  879. pythonlings/curriculum/solutions/type_hints5.py +2 -0
  880. pythonlings/curriculum/solutions/type_hints6.py +2 -0
  881. pythonlings/curriculum/solutions/type_hints7.py +2 -0
  882. pythonlings/curriculum/solutions/type_hints8.py +2 -0
  883. pythonlings/curriculum/solutions/variables1.py +2 -0
  884. pythonlings/curriculum/solutions/variables10.py +2 -0
  885. pythonlings/curriculum/solutions/variables2.py +2 -0
  886. pythonlings/curriculum/solutions/variables3.py +2 -0
  887. pythonlings/curriculum/solutions/variables4.py +2 -0
  888. pythonlings/curriculum/solutions/variables5.py +2 -0
  889. pythonlings/curriculum/solutions/variables6.py +2 -0
  890. pythonlings/curriculum/solutions/variables7.py +2 -0
  891. pythonlings/curriculum/solutions/variables8.py +2 -0
  892. pythonlings/curriculum/solutions/variables9.py +2 -0
  893. pythonlings/docs/NOTICE.md +9 -0
  894. pythonlings/docs/__init__.py +1 -0
  895. pythonlings/docs/index.json +160 -0
  896. pythonlings/docs/topics/__init__.py +1 -0
  897. pythonlings/docs/topics/async.md +97 -0
  898. pythonlings/docs/topics/classes.md +97 -0
  899. pythonlings/docs/topics/collections.md +96 -0
  900. pythonlings/docs/topics/comprehensions.md +97 -0
  901. pythonlings/docs/topics/conditionals.md +88 -0
  902. pythonlings/docs/topics/context_managers.md +97 -0
  903. pythonlings/docs/topics/dataclasses.md +97 -0
  904. pythonlings/docs/topics/datetime.md +97 -0
  905. pythonlings/docs/topics/decorators.md +91 -0
  906. pythonlings/docs/topics/dictionaries.md +96 -0
  907. pythonlings/docs/topics/enums.md +96 -0
  908. pythonlings/docs/topics/exceptions.md +96 -0
  909. pythonlings/docs/topics/file_io.md +96 -0
  910. pythonlings/docs/topics/functional.md +96 -0
  911. pythonlings/docs/topics/functions.md +97 -0
  912. pythonlings/docs/topics/generators.md +97 -0
  913. pythonlings/docs/topics/itertools.md +96 -0
  914. pythonlings/docs/topics/json.md +97 -0
  915. pythonlings/docs/topics/lists.md +97 -0
  916. pythonlings/docs/topics/loops.md +95 -0
  917. pythonlings/docs/topics/modules.md +97 -0
  918. pythonlings/docs/topics/oop_advanced.md +71 -0
  919. pythonlings/docs/topics/pathlib.md +79 -0
  920. pythonlings/docs/topics/recursion.md +73 -0
  921. pythonlings/docs/topics/regex.md +96 -0
  922. pythonlings/docs/topics/sets.md +97 -0
  923. pythonlings/docs/topics/strings.md +96 -0
  924. pythonlings/docs/topics/testing.md +97 -0
  925. pythonlings/docs/topics/tuples.md +97 -0
  926. pythonlings/docs/topics/type_hints.md +97 -0
  927. pythonlings/docs/topics/variables.md +97 -0
  928. pythonlings/pythonlings.tcss +123 -0
  929. pythonlings/screens/__init__.py +0 -0
  930. pythonlings/screens/docs.py +93 -0
  931. pythonlings/screens/topic_picker.py +107 -0
  932. pythonlings/screens/track.py +234 -0
  933. pythonlings/widgets/__init__.py +0 -0
  934. pythonlings/widgets/editor_pane.py +33 -0
  935. pythonlings/widgets/exercise_tree.py +33 -0
  936. pythonlings/widgets/output_panel.py +180 -0
  937. pythonlings/widgets/progress.py +15 -0
  938. pythonlings-0.3.0.dist-info/METADATA +259 -0
  939. pythonlings-0.3.0.dist-info/RECORD +942 -0
  940. pythonlings-0.3.0.dist-info/WHEEL +4 -0
  941. pythonlings-0.3.0.dist-info/entry_points.txt +2 -0
  942. pythonlings-0.3.0.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,13 @@
1
+ # Exercise: Recursion 6
2
+ # ---------------------
3
+ # I AM NOT DONE
4
+ #
5
+ # Complete `reverse_string(s)` so it returns the string `s` reversed
6
+ # using recursion. Base case: a string of length 0 or 1 is already
7
+ # reversed. Recursive case: reverse the tail, then append the first
8
+ # character.
9
+
10
+ def reverse_string(s):
11
+ if len(s) <= 1:
12
+ return s
13
+ return ???
@@ -0,0 +1,20 @@
1
+ # Exercise: Recursion 7
2
+ # ---------------------
3
+ # I AM NOT DONE
4
+ #
5
+ # Complete `deep_sum(nested)` so it returns the sum of all numbers in a
6
+ # possibly-nested list. Each element is either an int/float or another
7
+ # list. Base case: empty list returns 0. Recursive case: if the first
8
+ # element is a list, deep_sum it; otherwise treat it as a plain number.
9
+ # Add that to deep_sum of the rest.
10
+ #
11
+ # Example: deep_sum([1, [2, 3], [4, [5]]]) == 15
12
+
13
+ def deep_sum(nested):
14
+ if not nested:
15
+ return 0
16
+ first = nested[0]
17
+ rest = nested[1:]
18
+ if isinstance(first, list):
19
+ return deep_sum(first) + ???
20
+ return first + deep_sum(rest)
@@ -0,0 +1,27 @@
1
+ # Exercise: Recursion 8
2
+ # ---------------------
3
+ # I AM NOT DONE
4
+ #
5
+ # A tree is represented as a dict with keys "value" (int) and
6
+ # "children" (list of trees, possibly empty).
7
+ #
8
+ # Complete two functions:
9
+ #
10
+ # tree_depth(tree) — returns the depth of the tree. A tree with no
11
+ # children has depth 1. Otherwise depth is 1 + max depth of children.
12
+ #
13
+ # tree_search(tree, target) — returns True if `target` appears as a
14
+ # "value" anywhere in the tree, False otherwise.
15
+ #
16
+ # Both must be recursive.
17
+
18
+ def tree_depth(tree):
19
+ if not tree["children"]:
20
+ return 1
21
+ return ???
22
+
23
+
24
+ def tree_search(tree, target):
25
+ if tree["value"] == target:
26
+ return True
27
+ return ???
@@ -0,0 +1,16 @@
1
+ # Exercise: Regex 1
2
+ # I AM NOT DONE
3
+ #
4
+ # Use re.match to check whether `text` starts with the word "hello".
5
+ # Store the result (a match object or None) in `result`.
6
+ #
7
+ # re.match(pattern, string) returns a match object if the beginning of
8
+ # `string` matches `pattern`, otherwise None.
9
+ #
10
+ # Fix the pattern so that `result` is not None for the given `text`.
11
+
12
+ import re
13
+
14
+ text = "hello world"
15
+ pattern = "???"
16
+ result = re.match(pattern, text)
@@ -0,0 +1,31 @@
1
+ # Exercise: Regex 10
2
+ # I AM NOT DONE
3
+ #
4
+ # Parse a structured log line and extract three fields:
5
+ # level — the log level word (e.g. "ERROR", "INFO", "WARNING")
6
+ # logger — the logger name (word characters only, e.g. "db.engine")
7
+ # message — everything after the colon+space at the end
8
+ #
9
+ # Log line format:
10
+ # [LEVEL] logger_name: message text here
11
+ #
12
+ # Example:
13
+ # "[ERROR] db.engine: connection refused"
14
+ # → level="ERROR", logger="db.engine", message="connection refused"
15
+ #
16
+ # Use re.search with named capturing groups (?P<name>...).
17
+ # Fix the pattern (replace ???).
18
+ #
19
+ # Hints:
20
+ # \[ and \] match literal square brackets
21
+ # [\w.]+ matches word chars and dots (for dotted logger names)
22
+ # .+ matches the rest of the line (message)
23
+
24
+ import re
25
+
26
+ log_line = "[ERROR] db.engine: connection refused"
27
+ pattern = "???"
28
+ match = re.search(pattern, log_line)
29
+ level = match.group("level")
30
+ logger = match.group("logger")
31
+ message = match.group("message")
@@ -0,0 +1,16 @@
1
+ # Exercise: Regex 2
2
+ # I AM NOT DONE
3
+ #
4
+ # Use re.search to find the word "python" anywhere inside `text`.
5
+ # Store the result (a match object or None) in `result`.
6
+ #
7
+ # Unlike re.match, re.search scans through the whole string looking for
8
+ # the first location where the pattern matches.
9
+ #
10
+ # Fix the pattern so that `result` is not None for the given `text`.
11
+
12
+ import re
13
+
14
+ text = "I love python programming"
15
+ pattern = "???"
16
+ result = re.search(pattern, text)
@@ -0,0 +1,16 @@
1
+ # Exercise: Regex 3
2
+ # I AM NOT DONE
3
+ #
4
+ # Use re.findall to collect every run of digits in `text` as a list
5
+ # of strings. Store the result in `numbers`.
6
+ #
7
+ # re.findall(pattern, string) returns a list of all non-overlapping
8
+ # matches of `pattern` in `string`.
9
+ #
10
+ # The pattern `\d+` matches one or more digit characters.
11
+ # Fix the pattern (replace ???) so that `numbers` holds all digit runs.
12
+
13
+ import re
14
+
15
+ text = "order 12 has 3 items and 450 points"
16
+ numbers = re.findall("???", text)
@@ -0,0 +1,19 @@
1
+ # Exercise: Regex 4
2
+ # I AM NOT DONE
3
+ #
4
+ # Use re.findall with a character-class pattern to collect every
5
+ # lowercase ASCII word (only letters a-z) from `text`.
6
+ # Store the result in `words`.
7
+ #
8
+ # Character classes:
9
+ # [a-z] matches any single lowercase letter
10
+ # [a-z]+ matches a run of one or more lowercase letters
11
+ #
12
+ # Note: `\w` also matches digits and underscores, so use [a-z]+ here.
13
+ # Fix the pattern (replace ???) so that `words` contains only
14
+ # lowercase letter runs, ignoring digits and punctuation.
15
+
16
+ import re
17
+
18
+ text = "Hello world 123 foo_bar baz!"
19
+ words = re.findall("???", text)
@@ -0,0 +1,19 @@
1
+ # Exercise: Regex 5
2
+ # I AM NOT DONE
3
+ #
4
+ # Use re.findall to find all tokens that look like version numbers:
5
+ # one or more digits, a literal dot, one or more digits
6
+ # (e.g. "3.10", "1.0", "2.7").
7
+ # Store the result in `versions`.
8
+ #
9
+ # Quantifier reminder:
10
+ # + one or more of the preceding element
11
+ # \d any digit (same as [0-9])
12
+ # \. a literal dot (dot without backslash means "any character")
13
+ #
14
+ # Fix the pattern (replace ???) to capture version-like tokens.
15
+
16
+ import re
17
+
18
+ text = "requires python 3.10 or 2.7, not 1.x or 42"
19
+ versions = re.findall("???", text)
@@ -0,0 +1,23 @@
1
+ # Exercise: Regex 6
2
+ # I AM NOT DONE
3
+ #
4
+ # Use re.fullmatch (or a pattern with ^ and $) to validate that
5
+ # `code` is exactly five uppercase letters followed by exactly three
6
+ # digits — nothing more, nothing less.
7
+ # Store the boolean result in `is_valid`.
8
+ #
9
+ # Anchors:
10
+ # ^ start of string
11
+ # $ end of string
12
+ # {n} exactly n repetitions of the preceding element
13
+ # [A-Z] any uppercase letter
14
+ #
15
+ # Fix the pattern (replace ???).
16
+ # Example valid code: "ABCDE123"
17
+ # Example invalid: "ABCDE12" (too few digits), "abcde123" (lowercase)
18
+
19
+ import re
20
+
21
+ code = "ABCDE123"
22
+ pattern = "???"
23
+ is_valid = bool(re.fullmatch(pattern, code))
@@ -0,0 +1,24 @@
1
+ # Exercise: Regex 7
2
+ # I AM NOT DONE
3
+ #
4
+ # Use re.search with a capturing group to extract the area code from
5
+ # a US phone number of the form "(NXX) NXX-XXXX".
6
+ # Store the three-digit area code string in `area_code`.
7
+ #
8
+ # Capturing groups:
9
+ # (...) captures whatever the sub-pattern matches
10
+ # match.group(1) returns the text captured by the first group
11
+ #
12
+ # The phone number format: (NXX) NXX-XXXX
13
+ # \( literal open parenthesis
14
+ # \d{3} three digits ← this is the area code to capture
15
+ # \) literal close parenthesis
16
+ #
17
+ # Fix the pattern (replace ???) so that group(1) gives the area code.
18
+
19
+ import re
20
+
21
+ phone = "(415) 555-2671"
22
+ pattern = "???"
23
+ match = re.search(pattern, phone)
24
+ area_code = match.group(1)
@@ -0,0 +1,19 @@
1
+ # Exercise: Regex 8
2
+ # I AM NOT DONE
3
+ #
4
+ # Use re.sub to censor every occurrence of a bad word in `text` by
5
+ # replacing it with "***". The bad words are: "spam" and "junk".
6
+ # Store the cleaned string in `clean`.
7
+ #
8
+ # re.sub(pattern, replacement, string) returns a new string with all
9
+ # matches replaced by `replacement`.
10
+ #
11
+ # Hint: the pipe character | means "or" in a regex: spam|junk
12
+ #
13
+ # Fix the pattern (replace ???).
14
+
15
+ import re
16
+
17
+ text = "This email is full of spam and junk, total spam!"
18
+ pattern = "???"
19
+ clean = re.sub(pattern, "***", text)
@@ -0,0 +1,22 @@
1
+ # Exercise: Regex 9
2
+ # I AM NOT DONE
3
+ #
4
+ # Use re.search with named capturing groups to parse a date string of
5
+ # the form "YYYY-MM-DD" and extract its parts.
6
+ # Store the results in `year`, `month`, and `day` (all strings).
7
+ #
8
+ # Named groups:
9
+ # (?P<name>...) captures text and names it `name`
10
+ # match.group("name") retrieves the captured text by name
11
+ #
12
+ # Fix the pattern (replace ???) so the three named groups
13
+ # "year", "month", and "day" each capture the appropriate part.
14
+
15
+ import re
16
+
17
+ date_str = "2024-07-15"
18
+ pattern = "???"
19
+ match = re.search(pattern, date_str)
20
+ year = match.group("year")
21
+ month = match.group("month")
22
+ day = match.group("day")
@@ -0,0 +1,6 @@
1
+ # Exercise: Sets 1
2
+ # I AM NOT DONE
3
+ #
4
+ # Create a set called `primes` containing the numbers 2, 3, 5, and 7.
5
+
6
+ primes = ???
@@ -0,0 +1,21 @@
1
+ # Exercise: Sets 10
2
+ # I AM NOT DONE
3
+ #
4
+ # Compare two collections and extract meaningful subsets.
5
+ #
6
+ # You have two lists of students who attended each day of a workshop.
7
+ # Compute:
8
+ # attended_both — a set of students who came on BOTH days
9
+ # attended_any — a set of students who came on AT LEAST ONE day
10
+ # only_day1 — a set of students who came on day 1 but NOT day 2
11
+ # only_day2 — a set of students who came on day 2 but NOT day 1
12
+ #
13
+ # Use set operations (|, &, -) on sets converted from the lists.
14
+
15
+ day1 = ["alice", "bob", "carol", "dave"]
16
+ day2 = ["bob", "carol", "eve", "frank"]
17
+
18
+ attended_both = ???
19
+ attended_any = ???
20
+ only_day1 = ???
21
+ only_day2 = ???
@@ -0,0 +1,12 @@
1
+ # Exercise: Sets 2
2
+ # I AM NOT DONE
3
+ #
4
+ # Start with the set `colors` below.
5
+ # 1. Add the string "purple" to it using `.add()`.
6
+ # 2. Remove "orange" from it using `.discard()`.
7
+ #
8
+ # After both operations, `colors` should equal {"red", "blue", "purple"}.
9
+
10
+ colors = {"red", "blue", "orange"}
11
+ # your code here
12
+ ???
@@ -0,0 +1,15 @@
1
+ # Exercise: Sets 3
2
+ # I AM NOT DONE
3
+ #
4
+ # Use the `in` operator to check membership in a set.
5
+ #
6
+ # Given the set `fruits`, set:
7
+ # has_apple = True if "apple" is in fruits, False otherwise
8
+ # has_grape = True if "grape" is in fruits, False otherwise
9
+ #
10
+ # Do NOT use literals True or False directly — use the `in` operator.
11
+
12
+ fruits = {"apple", "banana", "cherry"}
13
+
14
+ has_apple = "apple" ??? fruits
15
+ has_grape = "grape" ??? fruits
@@ -0,0 +1,14 @@
1
+ # Exercise: Sets 4
2
+ # I AM NOT DONE
3
+ #
4
+ # Compute the union of two sets — every element that appears in either set.
5
+ #
6
+ # Given `a` and `b`, store their union in `combined`.
7
+ # Use the `|` operator or the `.union()` method.
8
+ #
9
+ # Expected: combined == {1, 2, 3, 4, 5, 6}
10
+
11
+ a = {1, 2, 3, 4}
12
+ b = {3, 4, 5, 6}
13
+
14
+ combined = ???
@@ -0,0 +1,14 @@
1
+ # Exercise: Sets 5
2
+ # I AM NOT DONE
3
+ #
4
+ # Compute the intersection of two sets — only elements present in BOTH sets.
5
+ #
6
+ # Given `a` and `b`, store their intersection in `shared`.
7
+ # Use the `&` operator or the `.intersection()` method.
8
+ #
9
+ # Expected: shared == {3, 4}
10
+
11
+ a = {1, 2, 3, 4}
12
+ b = {3, 4, 5, 6}
13
+
14
+ shared = ???
@@ -0,0 +1,14 @@
1
+ # Exercise: Sets 6
2
+ # I AM NOT DONE
3
+ #
4
+ # Compute the difference of two sets — elements in `a` that are NOT in `b`.
5
+ #
6
+ # Given `a` and `b`, store `a` minus `b` in `only_in_a`.
7
+ # Use the `-` operator or the `.difference()` method.
8
+ #
9
+ # Expected: only_in_a == {1, 2}
10
+
11
+ a = {1, 2, 3, 4}
12
+ b = {3, 4, 5, 6}
13
+
14
+ only_in_a = ???
@@ -0,0 +1,16 @@
1
+ # Exercise: Sets 7
2
+ # I AM NOT DONE
3
+ #
4
+ # Remove duplicates from a list by converting it to a set.
5
+ #
6
+ # Given `numbers` (a list with repeated values), create `unique` — a set
7
+ # containing exactly the distinct values from `numbers`.
8
+ #
9
+ # Then create `unique_count` — the number of unique values (an int).
10
+ #
11
+ # Expected: unique == {1, 2, 3, 4, 5} and unique_count == 5
12
+
13
+ numbers = [1, 2, 3, 2, 4, 1, 5, 3, 2, 4]
14
+
15
+ unique = ???
16
+ unique_count = ???
@@ -0,0 +1,16 @@
1
+ # Exercise: Sets 8
2
+ # I AM NOT DONE
3
+ #
4
+ # Test subset and superset relationships between sets.
5
+ #
6
+ # Given `small` and `big` below, compute:
7
+ # is_subset — True if `small` is a subset of `big` (use <= or .issubset())
8
+ # is_superset — True if `big` is a superset of `small` (use >= or .issuperset())
9
+ #
10
+ # Expected: both is_subset and is_superset should be True.
11
+
12
+ small = {2, 4}
13
+ big = {1, 2, 3, 4, 5}
14
+
15
+ is_subset = ???
16
+ is_superset = ???
@@ -0,0 +1,15 @@
1
+ # Exercise: Sets 9
2
+ # I AM NOT DONE
3
+ #
4
+ # Use a set comprehension to build a set of squares of even numbers.
5
+ #
6
+ # Given `numbers`, create `even_squares` — a set containing the square of
7
+ # every even number in `numbers`.
8
+ #
9
+ # Use a set comprehension: {expr for item in iterable if condition}
10
+ #
11
+ # Expected: even_squares == {4, 16, 36}
12
+
13
+ numbers = [1, 2, 3, 4, 5, 6, 7]
14
+
15
+ even_squares = ???
@@ -0,0 +1,6 @@
1
+ # Exercise: Strings 1
2
+ # I AM NOT DONE
3
+ #
4
+ # Assign the string "hello" to the variable `greeting`.
5
+
6
+ greeting = ???
@@ -0,0 +1,11 @@
1
+ # Exercise: Strings 10
2
+ # I AM NOT DONE
3
+ #
4
+ # Build a formatted report line from the given data. The expected result is:
5
+ # "Item: widget | Qty: 42 | Price: $3.99"
6
+ # Use an f-string. The price must be formatted to exactly 2 decimal places.
7
+
8
+ item = "widget"
9
+ qty = 42
10
+ price = 3.99
11
+ report = ???
@@ -0,0 +1,9 @@
1
+ # Exercise: Strings 2
2
+ # I AM NOT DONE
3
+ #
4
+ # Use the `+` operator to concatenate `first` and `last` (with a space in
5
+ # between) and assign the result to `full_name`.
6
+
7
+ first = "Ada"
8
+ last = "Lovelace"
9
+ full_name = ???
@@ -0,0 +1,9 @@
1
+ # Exercise: Strings 3
2
+ # I AM NOT DONE
3
+ #
4
+ # Using indexing on `word`, assign its first character to `first_char`
5
+ # and its last character to `last_char`.
6
+
7
+ word = "python"
8
+ first_char = ???
9
+ last_char = ???
@@ -0,0 +1,8 @@
1
+ # Exercise: Strings 4
2
+ # I AM NOT DONE
3
+ #
4
+ # Using a slice on `sentence`, extract the word "quick" (characters at
5
+ # indices 4 through 8 inclusive) and assign it to `word`.
6
+
7
+ sentence = "the quick brown fox"
8
+ word = ???
@@ -0,0 +1,10 @@
1
+ # Exercise: Strings 5
2
+ # I AM NOT DONE
3
+ #
4
+ # Assign the number of characters in `text` to `length`, its all-uppercase
5
+ # form to `upper`, and its all-lowercase form to `lower`.
6
+
7
+ text = "Hello, World!"
8
+ length = ???
9
+ upper = ???
10
+ lower = ???
@@ -0,0 +1,10 @@
1
+ # Exercise: Strings 6
2
+ # I AM NOT DONE
3
+ #
4
+ # Use .strip() to remove leading and trailing whitespace from `raw` and
5
+ # assign the result to `clean`. Then use .replace() to swap every "cat"
6
+ # in `clean` with "dog" and assign the result to `replaced`.
7
+
8
+ raw = " I love cats and cats "
9
+ clean = ???
10
+ replaced = ???
@@ -0,0 +1,10 @@
1
+ # Exercise: Strings 7
2
+ # I AM NOT DONE
3
+ #
4
+ # Use .split() to break `csv_line` on commas and assign the resulting list
5
+ # to `items`. Then use ", ".join() to reassemble `items` back into a single
6
+ # string and assign it to `rejoined`.
7
+
8
+ csv_line = "apple,banana,cherry"
9
+ items = ???
10
+ rejoined = ???
@@ -0,0 +1,9 @@
1
+ # Exercise: Strings 8
2
+ # I AM NOT DONE
3
+ #
4
+ # Use an f-string to build a greeting of the form "Hello, <name>! You are
5
+ # <age> years old." and assign it to `message`. Do not use concatenation.
6
+
7
+ name = "Grace"
8
+ age = 30
9
+ message = ???
@@ -0,0 +1,10 @@
1
+ # Exercise: Strings 9
2
+ # I AM NOT DONE
3
+ #
4
+ # Use the `in` operator to check whether "fox" appears in `sentence` and
5
+ # assign the boolean result to `has_fox`. Then use .find() to find the
6
+ # index where "fox" starts and assign it to `fox_index`.
7
+
8
+ sentence = "the quick brown fox jumps"
9
+ has_fox = ???
10
+ fox_index = ???
@@ -0,0 +1,16 @@
1
+ # Exercise: Testing 1
2
+ # I AM NOT DONE
3
+ #
4
+ # The simplest test in Python is a plain `assert` statement.
5
+ # If the expression is True, nothing happens; if False, an AssertionError
6
+ # is raised and the test fails.
7
+ #
8
+ # Replace ??? so that the assertion holds:
9
+ # result should equal 4 after calling double(2).
10
+
11
+ def double(x):
12
+ return x * 2
13
+
14
+
15
+ result = double(2)
16
+ assert result == ???
@@ -0,0 +1,21 @@
1
+ # Exercise: Testing 10
2
+ # I AM NOT DONE
3
+ #
4
+ # Robust tests include *edge cases*: empty input, zero, negatives, and
5
+ # boundary values — the inputs most likely to expose bugs.
6
+ #
7
+ # Complete `test_sum_list` to cover ALL of the following edge cases for
8
+ # `sum_list(numbers)`:
9
+ # sum_list([]) == 0 (empty list)
10
+ # sum_list([0]) == 0 (single zero)
11
+ # sum_list([-1, -2]) == -3 (all negatives)
12
+ # sum_list([1, -1]) == 0 (cancellation)
13
+ # sum_list([1, 2, 3]) == 6 (normal case)
14
+
15
+ def sum_list(numbers):
16
+ return sum(numbers)
17
+
18
+
19
+ def test_sum_list():
20
+ # write five assertions covering the edge cases above
21
+ pass
@@ -0,0 +1,27 @@
1
+ # Exercise: Testing 11
2
+ # I AM NOT DONE
3
+ #
4
+ # Testing a class means: construct an instance, call its methods, and
5
+ # assert the resulting state is correct.
6
+ #
7
+ # Complete `test_counter` to verify the Counter class:
8
+ # 1. A new Counter starts at 0.
9
+ # 2. After calling increment() once, value is 1.
10
+ # 3. After calling increment() again, value is 2.
11
+ # 4. After calling reset(), value is back to 0.
12
+
13
+ class Counter:
14
+ def __init__(self):
15
+ self.value = 0
16
+
17
+ def increment(self):
18
+ self.value += 1
19
+
20
+ def reset(self):
21
+ self.value = 0
22
+
23
+
24
+ def test_counter():
25
+ # 1. create a Counter instance
26
+ # 2-4. assert state after each method call
27
+ pass
@@ -0,0 +1,51 @@
1
+ # Exercise: Testing 12
2
+ # I AM NOT DONE
3
+ #
4
+ # A test suite is a collection of test functions that together give
5
+ # confidence in a whole module. Write a *separate* test function for each
6
+ # concern rather than cramming everything into one.
7
+ #
8
+ # Below is a small "string_utils" module. Write four test functions:
9
+ #
10
+ # test_palindrome() — verify is_palindrome for at least 3 inputs
11
+ # (one true, one false, one edge case like "")
12
+ # test_word_count() — verify word_count for at least 3 inputs
13
+ # (normal sentence, single word, empty string)
14
+ # test_title_case() — verify to_title_case for at least 2 inputs
15
+ # test_truncate() — verify truncate for at least 3 inputs
16
+ # (short string unchanged, long string truncated,
17
+ # boundary length exactly)
18
+
19
+ def is_palindrome(s):
20
+ s = s.lower().replace(" ", "")
21
+ return s == s[::-1]
22
+
23
+
24
+ def word_count(s):
25
+ if not s.strip():
26
+ return 0
27
+ return len(s.split())
28
+
29
+
30
+ def to_title_case(s):
31
+ return s.title()
32
+
33
+
34
+ def truncate(s, max_len):
35
+ return s if len(s) <= max_len else s[:max_len] + "..."
36
+
37
+
38
+ def test_palindrome():
39
+ pass
40
+
41
+
42
+ def test_word_count():
43
+ pass
44
+
45
+
46
+ def test_title_case():
47
+ pass
48
+
49
+
50
+ def test_truncate():
51
+ pass