From 17143a4821ad8c3d9d61f1faccaca5f9d798fd13 Mon Sep 17 00:00:00 2001 From: Jessica Wilkins <67210629+jdwilkin4@users.noreply.github.com> Date: Mon, 16 Mar 2026 13:40:03 -0700 Subject: [PATCH] feat: add python OOP course to catalog (#66343) Co-authored-by: majestic-owl448 <26656284+majestic-owl448@users.noreply.github.com> --- client/i18n/locales/english/intro.json | 30 +++++++++ client/i18n/locales/english/translations.json | 1 + client/src/assets/superblock-icon.tsx | 1 + .../getters-and-setters-video.md | 39 +++++++++++ .../oop-principles-video.md | 39 +++++++++++ .../class-vs-static-methods-video.md | 39 +++++++++++ .../understanding-inheritance-video.md | 39 +++++++++++ .../getting-started-with-classes-video.md | 55 +++++++++++++++ ...on-to-object-oriented-programming-video.md | 39 +++++++++++ .../oop-basics/using-constructors-video.md | 67 +++++++++++++++++++ curriculum/schema/curriculum-schema.js | 1 + curriculum/src/build-curriculum.ts | 1 + .../blocks/advanced-oop-concepts.json | 18 +++++ .../blocks/methods-and-inheritance.json | 18 +++++ curriculum/structure/blocks/oop-basics.json | 22 ++++++ curriculum/structure/curriculum.json | 1 + .../superblocks/learn-oop-with-python.json | 3 + packages/shared/src/config/catalog.ts | 6 ++ .../src/config/certification-settings.ts | 1 + packages/shared/src/config/curriculum.ts | 2 + 20 files changed, 422 insertions(+) create mode 100644 curriculum/challenges/english/blocks/advanced-oop-concepts/getters-and-setters-video.md create mode 100644 curriculum/challenges/english/blocks/advanced-oop-concepts/oop-principles-video.md create mode 100644 curriculum/challenges/english/blocks/methods-and-inheritance/class-vs-static-methods-video.md create mode 100644 curriculum/challenges/english/blocks/methods-and-inheritance/understanding-inheritance-video.md create mode 100644 curriculum/challenges/english/blocks/oop-basics/getting-started-with-classes-video.md create mode 100644 curriculum/challenges/english/blocks/oop-basics/introduction-to-object-oriented-programming-video.md create mode 100644 curriculum/challenges/english/blocks/oop-basics/using-constructors-video.md create mode 100644 curriculum/structure/blocks/advanced-oop-concepts.json create mode 100644 curriculum/structure/blocks/methods-and-inheritance.json create mode 100644 curriculum/structure/blocks/oop-basics.json create mode 100644 curriculum/structure/superblocks/learn-oop-with-python.json diff --git a/client/i18n/locales/english/intro.json b/client/i18n/locales/english/intro.json index c98747fe27d..275e4286814 100644 --- a/client/i18n/locales/english/intro.json +++ b/client/i18n/locales/english/intro.json @@ -1441,6 +1441,36 @@ } } }, + "learn-oop-with-python": { + "title": "Learn OOP with Python", + "summary": [ + "In this video course, you learn about object-oriented programming using Python." + ], + "intro": [ + "Object-Oriented Programming (OOP) is a programming paradigm based on the concept of objects, which can contain data and code to manipulate that data. This course introduces the key principles of OOP, including classes, objects, inheritance, and shows how to apply them in practice." + ], + "note": "", + "blocks": { + "oop-basics": { + "title": "OOP Basics", + "intro": [ + "In these videos, learn the basics of OOP including how to create classes and work with constructors." + ] + }, + "methods-and-inheritance": { + "title": "Methods and Inheritance", + "intro": [ + "In these videos, learn about methods and inheritance in OOP." + ] + }, + "advanced-oop-concepts": { + "title": "Advanced OOP Concepts", + "intro": [ + "In these videos, learn about advanced OOP concepts including getters, setters and other important OOP principles." + ] + } + } + }, "introduction-to-python-basics": { "title": "Introduction to Python Basics", "summary": ["Learn the fundamentals of Python programming."], diff --git a/client/i18n/locales/english/translations.json b/client/i18n/locales/english/translations.json index acbf03bfb4e..e446dcb0e7b 100644 --- a/client/i18n/locales/english/translations.json +++ b/client/i18n/locales/english/translations.json @@ -1280,6 +1280,7 @@ "learn-rag-mcp-fundamentals": "Learn RAG and MCP Fundamentals", "introduction-to-precalculus": "Introduction to Precalculus", "learn-prompting-fundamentals": "Learn Prompting Fundamentals", + "learn-oop-with-python": "Learn OOP with Python", "a2-english-for-developers": "A2 English for Developers", "a2-english-for-developers-cert": "A2 English for Developers Certification (Beta)", "b1-english-for-developers": "B1 English for Developers", diff --git a/client/src/assets/superblock-icon.tsx b/client/src/assets/superblock-icon.tsx index 946bccc7807..533cb0f4efe 100644 --- a/client/src/assets/superblock-icon.tsx +++ b/client/src/assets/superblock-icon.tsx @@ -90,6 +90,7 @@ const iconMap = { [SuperBlocks.RelationalDbV9]: DatabaseIcon, [SuperBlocks.BackEndDevApisV9]: APIIcon, [SuperBlocks.FullStackDeveloperV9]: Code, + [SuperBlocks.LearnOOPWithPython]: PythonIcon, [SuperBlocks.LearnRAGAndMCPFundamentals]: Code, [SuperBlocks.IntroductionToBash]: Code, [SuperBlocks.IntroductionToSQLAndPostgreSQL]: DatabaseIcon, diff --git a/curriculum/challenges/english/blocks/advanced-oop-concepts/getters-and-setters-video.md b/curriculum/challenges/english/blocks/advanced-oop-concepts/getters-and-setters-video.md new file mode 100644 index 00000000000..b7892a2d7de --- /dev/null +++ b/curriculum/challenges/english/blocks/advanced-oop-concepts/getters-and-setters-video.md @@ -0,0 +1,39 @@ +--- +id: 69ae9f3ca9e6da4eb0d5f7f9 +title: Getters and Setters +challengeType: 11 +videoId: o8zKHbpd87s +dashedName: getters-and-setters +--- + +# --description-- + +In this video, you will learn about getters and setters. + +# --questions-- + +## --text-- + +What is a setter? + +## --answers-- + +A function that automatically deletes an object when it goes out of scope. + +--- + +A method that retrieves or reads the value of an attribute. + +--- + +A method in a class used to set or update the value of a private or protected attribute. + +--- + +A method that creates a new class instance without modifying any attributes. + +## --video-solution-- + +3 + + diff --git a/curriculum/challenges/english/blocks/advanced-oop-concepts/oop-principles-video.md b/curriculum/challenges/english/blocks/advanced-oop-concepts/oop-principles-video.md new file mode 100644 index 00000000000..ded4cc1ecd8 --- /dev/null +++ b/curriculum/challenges/english/blocks/advanced-oop-concepts/oop-principles-video.md @@ -0,0 +1,39 @@ +--- +id: 69ae9f41a9e6da4eb0d5f7fa +title: OOP Principles +challengeType: 11 +videoId: rkOObSk6ApA +dashedName: oop-principles +--- + +# --description-- + +In this video, you will learn about common OOP principles. + +# --questions-- + +## --text-- + +Which of the following is NOT a core OOP principle? + +## --answers-- + +Polymorphism + +--- + +Encapsulation + +--- + +Singleton + +--- + +Abstraction + +## --video-solution-- + +3 + + diff --git a/curriculum/challenges/english/blocks/methods-and-inheritance/class-vs-static-methods-video.md b/curriculum/challenges/english/blocks/methods-and-inheritance/class-vs-static-methods-video.md new file mode 100644 index 00000000000..4b5729d5cf0 --- /dev/null +++ b/curriculum/challenges/english/blocks/methods-and-inheritance/class-vs-static-methods-video.md @@ -0,0 +1,39 @@ +--- +id: 69ae9cdfa9e6da4eb0d5f7f7 +title: Class vs. Static Methods +challengeType: 11 +videoId: Vo84LQ14yI4 +dashedName: class-vs-static-methods +--- + +# --description-- + +In this video, you will learn the difference between class and static methods. + +# --questions-- + +## --text-- + +What is a class method? + +## --answers-- + +A method that only works with global variables and is unrelated to the class or its instances. + +--- + +A method that can only be called on an instance of a class and cannot access class-level attributes. + +--- + +A method that automatically runs when an object is deleted. + +--- + +A method that is bound to the class itself, rather than an instance of the class. + +## --video-solution-- + +4 + + diff --git a/curriculum/challenges/english/blocks/methods-and-inheritance/understanding-inheritance-video.md b/curriculum/challenges/english/blocks/methods-and-inheritance/understanding-inheritance-video.md new file mode 100644 index 00000000000..940fadb31b3 --- /dev/null +++ b/curriculum/challenges/english/blocks/methods-and-inheritance/understanding-inheritance-video.md @@ -0,0 +1,39 @@ +--- +id: 69ae9ce3a9e6da4eb0d5f7f8 +title: Understanding Inheritance +challengeType: 11 +videoId: 5SehMN6vRgA +dashedName: understanding-inheritance +--- + +# --description-- + +In this video, you will learn about inheritance. + +# --questions-- + +## --text-- + +What is inheritance? + +## --answers-- + +The ability of a child class to acquire the properties and methods of a parent class. + +--- + +A way for an object to automatically delete its parent class’s attributes. + +--- + +A mechanism where a class can only use global variables. + +--- + +The process of copying methods from one object to another unrelated object. + +## --video-solution-- + +1 + + diff --git a/curriculum/challenges/english/blocks/oop-basics/getting-started-with-classes-video.md b/curriculum/challenges/english/blocks/oop-basics/getting-started-with-classes-video.md new file mode 100644 index 00000000000..f1015d8412d --- /dev/null +++ b/curriculum/challenges/english/blocks/oop-basics/getting-started-with-classes-video.md @@ -0,0 +1,55 @@ +--- +id: 69ae96daa9e6da4eb0d5f7f4 +title: Getting Started with Classes +challengeType: 11 +videoId: _066KcCuaYM +dashedName: getting-started-with-classes +--- + +# --description-- + +In this video, you will learn the basics of OOP by getting started working with classes in Python. + +# --questions-- + +## --text-- + +Which of the following is the correct way to add a method to a class? + +## --answers-- + +```py +class Dog: + set bark(self): + print("Woof!") +``` + +--- + +```py +class Dog: + def bark(self): + print("Woof!") +``` + +--- + +```py +class Dog: + method bark(self): + print("Woof!") +``` + +--- + +```py +class Dog: + def bark: + print("Woof!") +``` + +## --video-solution-- + +2 + + diff --git a/curriculum/challenges/english/blocks/oop-basics/introduction-to-object-oriented-programming-video.md b/curriculum/challenges/english/blocks/oop-basics/introduction-to-object-oriented-programming-video.md new file mode 100644 index 00000000000..7643da6e075 --- /dev/null +++ b/curriculum/challenges/english/blocks/oop-basics/introduction-to-object-oriented-programming-video.md @@ -0,0 +1,39 @@ +--- +id: 69ae9744a9e6da4eb0d5f7f6 +title: Introduction to Object-Oriented Programming +challengeType: 11 +videoId: sQjvwm8P1iY +dashedName: introduction-to-object-oriented-programming +--- + +# --description-- + +In this video, instructor Jim from `JimShapedCoding` will explain what to expect from this course on Object-Oriented Programming with Python. + +# --questions-- + +## --text-- + +Which of the following is NOT an OOP concept? + +## --answers-- + +Encapsulation + +--- + +Polymorphism + +--- + +Recursion + +--- + +Abstract Classes + +## --video-solution-- + +3 + + diff --git a/curriculum/challenges/english/blocks/oop-basics/using-constructors-video.md b/curriculum/challenges/english/blocks/oop-basics/using-constructors-video.md new file mode 100644 index 00000000000..1c1cb51ffad --- /dev/null +++ b/curriculum/challenges/english/blocks/oop-basics/using-constructors-video.md @@ -0,0 +1,67 @@ +--- +id: 69ae96dfa9e6da4eb0d5f7f5 +title: Using Constructors +challengeType: 11 +videoId: CDFRHw4SACU +dashedName: using-constructors +--- + +# --description-- + +In this video, you will learn how to work with constructors in classes. + +# --questions-- + +## --text-- + +Which of the following is the correct way to write a constructor? + +## --answers-- + +```py +class Dog: + def __init__(self, name): + name = name + + def bark(self): + print(f"{self.name} says: Woof!") +``` + +--- + +```py +class Dog: + def __init__(name): + self.name = name + + def bark(self): + print(f"{self.name} says: Woof!") +``` + +--- + +```py +class Dog: + def __init__(self, name): + self.name = name + + def bark(self): + print(f"{self.name} says: Woof!") +``` + +--- + +```py +class Dog: + def __init__ self, name: + self.name = name + + def bark(self): + print(f"{self.name} says: Woof!") +``` + +## --video-solution-- + +3 + + diff --git a/curriculum/schema/curriculum-schema.js b/curriculum/schema/curriculum-schema.js index 9eeec5d11f6..5a8168c587f 100644 --- a/curriculum/schema/curriculum-schema.js +++ b/curriculum/schema/curriculum-schema.js @@ -59,6 +59,7 @@ const superblocks = [ 'css-grid', 'lab-product-landing-page', 'css-animations', + 'learn-oop-with-python', 'learn-rag-mcp-fundamentals', 'introduction-to-bash', 'introduction-to-sql-and-postgresql', diff --git a/curriculum/src/build-curriculum.ts b/curriculum/src/build-curriculum.ts index a075f2f1477..4743b00473a 100644 --- a/curriculum/src/build-curriculum.ts +++ b/curriculum/src/build-curriculum.ts @@ -231,6 +231,7 @@ export const superBlockNames = { 'css-grid': SuperBlocks.CssGrid, 'lab-product-landing-page': SuperBlocks.LabProductLandingPage, 'css-animations': SuperBlocks.CssAnimations, + 'learn-oop-with-python': SuperBlocks.LearnOOPWithPython, 'learn-rag-mcp-fundamentals': SuperBlocks.LearnRAGAndMCPFundamentals, 'introduction-to-bash': SuperBlocks.IntroductionToBash, 'introduction-to-sql-and-postgresql': diff --git a/curriculum/structure/blocks/advanced-oop-concepts.json b/curriculum/structure/blocks/advanced-oop-concepts.json new file mode 100644 index 00000000000..673afe0c003 --- /dev/null +++ b/curriculum/structure/blocks/advanced-oop-concepts.json @@ -0,0 +1,18 @@ +{ + "name": "Advanced OOP Concepts", + "isUpcomingChange": false, + "blockLabel": "lecture", + "blockLayout": "challenge-list", + "dashedName": "advanced-oop-concepts", + "helpCategory": "Python", + "challengeOrder": [ + { + "id": "69ae9f3ca9e6da4eb0d5f7f9", + "title": "Getters and Setters" + }, + { + "id": "69ae9f41a9e6da4eb0d5f7fa", + "title": "OOP Principles" + } + ] +} diff --git a/curriculum/structure/blocks/methods-and-inheritance.json b/curriculum/structure/blocks/methods-and-inheritance.json new file mode 100644 index 00000000000..6597a43e419 --- /dev/null +++ b/curriculum/structure/blocks/methods-and-inheritance.json @@ -0,0 +1,18 @@ +{ + "name": "Methods and Inheritance", + "isUpcomingChange": false, + "blockLabel": "lecture", + "blockLayout": "challenge-list", + "dashedName": "methods-and-inheritance", + "helpCategory": "Python", + "challengeOrder": [ + { + "id": "69ae9cdfa9e6da4eb0d5f7f7", + "title": "Class vs. Static Methods" + }, + { + "id": "69ae9ce3a9e6da4eb0d5f7f8", + "title": "Understanding Inheritance" + } + ] +} diff --git a/curriculum/structure/blocks/oop-basics.json b/curriculum/structure/blocks/oop-basics.json new file mode 100644 index 00000000000..4b1a5d25dd3 --- /dev/null +++ b/curriculum/structure/blocks/oop-basics.json @@ -0,0 +1,22 @@ +{ + "name": "OOP Basics", + "isUpcomingChange": false, + "blockLabel": "lecture", + "blockLayout": "challenge-list", + "dashedName": "oop-basics", + "helpCategory": "Python", + "challengeOrder": [ + { + "id": "69ae9744a9e6da4eb0d5f7f6", + "title": "Introduction to Object-Oriented Programming" + }, + { + "id": "69ae96daa9e6da4eb0d5f7f4", + "title": "Getting Started with Classes" + }, + { + "id": "69ae96dfa9e6da4eb0d5f7f5", + "title": "Using Constructors" + } + ] +} diff --git a/curriculum/structure/curriculum.json b/curriculum/structure/curriculum.json index bec0d74c9bf..c0ae6a821b2 100644 --- a/curriculum/structure/curriculum.json +++ b/curriculum/structure/curriculum.json @@ -64,6 +64,7 @@ "css-grid", "lab-product-landing-page", "css-animations", + "learn-oop-with-python", "learn-rag-mcp-fundamentals", "introduction-to-bash", "introduction-to-sql-and-postgresql", diff --git a/curriculum/structure/superblocks/learn-oop-with-python.json b/curriculum/structure/superblocks/learn-oop-with-python.json new file mode 100644 index 00000000000..3636d822361 --- /dev/null +++ b/curriculum/structure/superblocks/learn-oop-with-python.json @@ -0,0 +1,3 @@ +{ + "blocks": ["oop-basics", "methods-and-inheritance", "advanced-oop-concepts"] +} diff --git a/packages/shared/src/config/catalog.ts b/packages/shared/src/config/catalog.ts index 85184c69f7b..e1ad9aa99dd 100644 --- a/packages/shared/src/config/catalog.ts +++ b/packages/shared/src/config/catalog.ts @@ -257,6 +257,12 @@ export const catalog: Catalog[] = [ hours: 1, topic: Topic.AI }, + { + superBlock: SuperBlocks.LearnOOPWithPython, + level: Levels.Intermediate, + hours: 3, + topic: Topic.Python + }, { superBlock: SuperBlocks.IntroductionToPythonBasics, level: Levels.Intermediate, diff --git a/packages/shared/src/config/certification-settings.ts b/packages/shared/src/config/certification-settings.ts index f8760b7d667..761925c8c5c 100644 --- a/packages/shared/src/config/certification-settings.ts +++ b/packages/shared/src/config/certification-settings.ts @@ -368,6 +368,7 @@ export const superBlockToCertMap: { [SuperBlocks.CssAnimations]: null, [SuperBlocks.LearnPythonForBeginners]: null, [SuperBlocks.IntroductionToAlgorithmsAndDataStructures]: null, + [SuperBlocks.LearnOOPWithPython]: null, [SuperBlocks.LearnRAGAndMCPFundamentals]: null, [SuperBlocks.IntroductionToPrecalculus]: null, [SuperBlocks.IntroductionToBash]: null, diff --git a/packages/shared/src/config/curriculum.ts b/packages/shared/src/config/curriculum.ts index ad7c18060a5..34e1fc2fa30 100644 --- a/packages/shared/src/config/curriculum.ts +++ b/packages/shared/src/config/curriculum.ts @@ -67,6 +67,7 @@ export enum SuperBlocks { CssAnimations = 'css-animations', LearnPythonForBeginners = 'learn-python-for-beginners', IntroductionToAlgorithmsAndDataStructures = 'introduction-to-algorithms-and-data-structures', + LearnOOPWithPython = 'learn-oop-with-python', LearnRAGAndMCPFundamentals = 'learn-rag-mcp-fundamentals', IntroductionToPrecalculus = 'introduction-to-precalculus', IntroductionToBash = 'introduction-to-bash', @@ -238,6 +239,7 @@ export const superBlockStages: StageMap = { SuperBlocks.CssAnimations, SuperBlocks.LearnPythonForBeginners, SuperBlocks.IntroductionToAlgorithmsAndDataStructures, + SuperBlocks.LearnOOPWithPython, SuperBlocks.LearnRAGAndMCPFundamentals, SuperBlocks.IntroductionToPrecalculus, SuperBlocks.IntroductionToBash,