[{"data":1,"prerenderedAt":6906},["ShallowReactive",2],{"tutorials-python":3,"category-items-python":987,"content-/python/classes-and-objects":988},[4,22,31,40,49,58,67,76,86,95,104,113,122,131,141,150,159,168,177,186,196,205,214,223,233,242,251,260,269,279,288,297,306,315,324,333,342,351,360,369,379,388,397,406,415,424,433,442,452,461,470,479,488,497,506,515,525,534,543,552,561,570,579,588,597,606,616,625,634,643,652,661,670,680,689,698,707,716,725,734,744,753,762,771,780,789,798,807,817,826,835,844,853,863,872,881,890,900,909,918,927,936,945,953,961,970,979],{"_path":5,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":9,"description":10,"slug":11,"order":12,"isParent":13,"icon":14,"_type":15,"_id":16,"_source":17,"_file":18,"_stem":19,"_extension":20,"children":21,"expanded":13},"/python/getting-started","python",false,"","Getting Started","Begin your Python programming journey. Learn what Python is, how to set it up, and write your first programs. Perfect for complete beginners starting their coding adventure.","getting-started",1,true,"pi pi-folder","markdown","content:python:1.getting-started.md","content","python/1.getting-started.md","python/1.getting-started","md",[22,31,40,49,58,67],{"_path":23,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":24,"description":25,"slug":26,"parentId":5,"order":27,"_type":15,"_id":28,"_source":17,"_file":29,"_stem":30,"_extension":20},"/python/what-is-python","What is Python","Discover Python's fascinating history, design philosophy, and key features. Learn why Python has become one of the world's most popular programming languages and perfect for beginners.","what-is-python",2,"content:python:2.what-is-python.md","python/2.what-is-python.md","python/2.what-is-python",{"_path":32,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":33,"description":34,"slug":35,"parentId":5,"order":36,"_type":15,"_id":37,"_source":17,"_file":38,"_stem":39,"_extension":20},"/python/setup-python","Setup Python","Learn how to install Python on your computer and set up your development environment. Step-by-step guide for Windows, macOS, and Linux with beginner-friendly instructions.","setup-python",3,"content:python:3.setup-python.md","python/3.setup-python.md","python/3.setup-python",{"_path":41,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":42,"description":43,"slug":44,"parentId":5,"order":45,"_type":15,"_id":46,"_source":17,"_file":47,"_stem":48,"_extension":20},"/python/your-first-program","Your First Program","Write and run your first Python program! Learn the basics of Python programming with simple examples and step-by-step instructions for beginners.","your-first-program",4,"content:python:4.your-first-program.md","python/4.your-first-program.md","python/4.your-first-program",{"_path":50,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":51,"description":52,"slug":53,"parentId":5,"order":54,"_type":15,"_id":55,"_source":17,"_file":56,"_stem":57,"_extension":20},"/python/python-code-structure","Python Code Structure","Learn how Python code is organized and structured. Understand indentation, line breaks, and the basic rules that make Python programs work correctly.","python-code-structure",5,"content:python:5.python-code-structure.md","python/5.python-code-structure.md","python/5.python-code-structure",{"_path":59,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":60,"description":61,"slug":62,"parentId":5,"order":63,"_type":15,"_id":64,"_source":17,"_file":65,"_stem":66,"_extension":20},"/python/writing-comments","Writing Comments","Learn how to write effective comments in Python. Discover when and how to document your code to make it clear, maintainable, and easy to understand.","writing-comments",6,"content:python:6.writing-comments.md","python/6.writing-comments.md","python/6.writing-comments",{"_path":68,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":69,"description":70,"slug":71,"parentId":5,"order":72,"_type":15,"_id":73,"_source":17,"_file":74,"_stem":75,"_extension":20},"/python/working-with-variables","Working with Variables","Learn how to create, use, and manage variables in Python. Understand how to store data, change values, and follow naming conventions for clean, readable code.","working-with-variables",7,"content:python:7.working-with-variables.md","python/7.working-with-variables.md","python/7.working-with-variables",{"_path":77,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":78,"description":79,"slug":80,"order":81,"isParent":13,"icon":14,"_type":15,"_id":82,"_source":17,"_file":83,"_stem":84,"_extension":20,"children":85,"expanded":13},"/python/basic-data-types","Basic Data Types","Learn about Python's fundamental data types including numbers, text, and boolean values","basic-data-types",8,"content:python:8.basic-data-types.md","python/8.basic-data-types.md","python/8.basic-data-types",[86,95,104,113,122],{"_path":87,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":88,"description":89,"slug":90,"parentId":77,"order":91,"_type":15,"_id":92,"_source":17,"_file":93,"_stem":94,"_extension":20},"/python/understanding-data-types","Understanding Data Types","Learn how Python identifies different data types and why they're important for programming","understanding-data-types",9,"content:python:9.understanding-data-types.md","python/9.understanding-data-types.md","python/9.understanding-data-types",{"_path":96,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":97,"description":98,"slug":99,"parentId":77,"order":100,"_type":15,"_id":101,"_source":17,"_file":102,"_stem":103,"_extension":20},"/python/working-with-numbers","Working with Numbers","Learn about Python's numeric data types including integers and floats, and how to perform calculations","working-with-numbers",10,"content:python:10.working-with-numbers.md","python/10.working-with-numbers.md","python/10.working-with-numbers",{"_path":105,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":106,"description":107,"slug":108,"parentId":77,"order":109,"_type":15,"_id":110,"_source":17,"_file":111,"_stem":112,"_extension":20},"/python/text-and-strings","Text and Strings","Learn how to work with text data in Python using strings, including creation, manipulation, and formatting","text-and-strings",11,"content:python:11.text-and-strings.md","python/11.text-and-strings.md","python/11.text-and-strings",{"_path":114,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":115,"description":116,"slug":117,"parentId":77,"order":118,"_type":15,"_id":119,"_source":17,"_file":120,"_stem":121,"_extension":20},"/python/true-false-values","True/False Values","Learn about boolean values in Python, including True/False logic, comparison operations, and how to use booleans for decision-making in your programs","true-false-values",12,"content:python:12.true-false-values.md","python/12.true-false-values.md","python/12.true-false-values",{"_path":123,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":124,"description":125,"slug":126,"parentId":77,"order":127,"_type":15,"_id":128,"_source":17,"_file":129,"_stem":130,"_extension":20},"/python/converting-types","Converting Types","Learn how to convert between different Python data types including strings, numbers, and booleans","converting-types",13,"content:python:13.converting-types.md","python/13.converting-types.md","python/13.converting-types",{"_path":132,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":133,"description":134,"slug":135,"order":136,"isParent":13,"icon":14,"_type":15,"_id":137,"_source":17,"_file":138,"_stem":139,"_extension":20,"children":140,"expanded":13},"/python/python-operators","Python Operators","Learn about Python operators - the symbols and keywords that perform operations on data. Discover arithmetic, comparison, logical, and assignment operators with simple examples.","python-operators",14,"content:python:14.python-operators.md","python/14.python-operators.md","python/14.python-operators",[141,150,159,168,177],{"_path":142,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":143,"description":144,"slug":145,"parentId":132,"order":146,"_type":15,"_id":147,"_source":17,"_file":148,"_stem":149,"_extension":20},"/python/math-operations","Math Operations","Learn Python's arithmetic operators for mathematical calculations. Master addition, subtraction, multiplication, division, and more with practical examples.","math-operations",15,"content:python:15.math-operations.md","python/15.math-operations.md","python/15.math-operations",{"_path":151,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":152,"description":153,"slug":154,"parentId":132,"order":155,"_type":15,"_id":156,"_source":17,"_file":157,"_stem":158,"_extension":20},"/python/comparing-values","Comparing Values","Learn Python's comparison operators to compare values and make decisions. Master equality, inequality, and relational operators with practical examples.","comparing-values",16,"content:python:16.comparing-values.md","python/16.comparing-values.md","python/16.comparing-values",{"_path":160,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":161,"description":162,"slug":163,"parentId":132,"order":164,"_type":15,"_id":165,"_source":17,"_file":166,"_stem":167,"_extension":20},"/python/logic-operations","Logic Operations","Learn about Python's logical operators for combining conditions and creating complex boolean expressions","logic-operations",17,"content:python:17.logic-operations.md","python/17.logic-operations.md","python/17.logic-operations",{"_path":169,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":170,"description":171,"slug":172,"parentId":132,"order":173,"_type":15,"_id":174,"_source":17,"_file":175,"_stem":176,"_extension":20},"/python/value-assignment","Value Assignment","Learn about Python's assignment operators for efficiently updating variables and performing calculations","value-assignment",18,"content:python:18.value-assignment.md","python/18.value-assignment.md","python/18.value-assignment",{"_path":178,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":179,"description":180,"slug":181,"parentId":132,"order":182,"_type":15,"_id":183,"_source":17,"_file":184,"_stem":185,"_extension":20},"/python/operator-precedence","Operator Precedence","Learn how Python evaluates expressions with multiple operators and how to control evaluation order","operator-precedence",19,"content:python:19.operator-precedence.md","python/19.operator-precedence.md","python/19.operator-precedence",{"_path":187,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":188,"description":189,"slug":190,"order":191,"isParent":13,"icon":14,"_type":15,"_id":192,"_source":17,"_file":193,"_stem":194,"_extension":20,"children":195,"expanded":13},"/python/decision-making","Decision Making","Learn how to make decisions in your Python programs using conditional statements and control flow","decision-making",20,"content:python:20.decision-making.md","python/20.decision-making.md","python/20.decision-making",[196,205,214],{"_path":197,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":198,"description":199,"slug":200,"parentId":187,"order":201,"_type":15,"_id":202,"_source":17,"_file":203,"_stem":204,"_extension":20},"/python/if-statements","If Statements","Learn how to use if statements to make decisions and control program flow in Python","if-statements",21,"content:python:21.if-statements.md","python/21.if-statements.md","python/21.if-statements",{"_path":206,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":207,"description":208,"slug":209,"parentId":187,"order":210,"_type":15,"_id":211,"_source":17,"_file":212,"_stem":213,"_extension":20},"/python/multiple-conditions","Multiple Conditions","Learn how to handle multiple conditions using elif statements and complex conditional logic in Python","multiple-conditions",22,"content:python:22.multiple-conditions.md","python/22.multiple-conditions.md","python/22.multiple-conditions",{"_path":215,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":216,"description":217,"slug":218,"parentId":187,"order":219,"_type":15,"_id":220,"_source":17,"_file":221,"_stem":222,"_extension":20},"/python/pattern-matching","Pattern Matching","Learn how to use Python's match-case statements for powerful pattern matching and complex decision making","pattern-matching",23,"content:python:23.pattern-matching.md","python/23.pattern-matching.md","python/23.pattern-matching",{"_path":224,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":225,"description":226,"slug":227,"order":228,"isParent":13,"icon":14,"_type":15,"_id":229,"_source":17,"_file":230,"_stem":231,"_extension":20,"children":232,"expanded":13},"/python/repetition-and-loops","Python Loops","Learn how to use loops to repeat code efficiently and handle repetitive tasks in Python","repetition-and-loops",24,"content:python:24.repetition-and-loops.md","python/24.repetition-and-loops.md","python/24.repetition-and-loops",[233,242,251,260],{"_path":234,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":235,"description":236,"slug":237,"parentId":224,"order":238,"_type":15,"_id":239,"_source":17,"_file":240,"_stem":241,"_extension":20},"/python/while-loops","While Loops","Learn how to use while loops for condition-based repetition and create loops that run until specific conditions are met","while-loops",25,"content:python:25.while-loops.md","python/25.while-loops.md","python/25.while-loops",{"_path":243,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":244,"description":245,"slug":246,"parentId":224,"order":247,"_type":15,"_id":248,"_source":17,"_file":249,"_stem":250,"_extension":20},"/python/for-loops","For Loops","Learn how to use for loops to iterate through sequences, collections, and ranges efficiently in Python","for-loops",26,"content:python:26.for-loops.md","python/26.for-loops.md","python/26.for-loops",{"_path":252,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":253,"description":254,"slug":255,"parentId":224,"order":256,"_type":15,"_id":257,"_source":17,"_file":258,"_stem":259,"_extension":20},"/python/loop-control","Loop Control","Master advanced loop control techniques including break, continue, and else clauses for sophisticated iteration patterns","loop-control",27,"content:python:27.loop-control.md","python/27.loop-control.md","python/27.loop-control",{"_path":261,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":262,"description":263,"slug":264,"parentId":224,"order":265,"_type":15,"_id":266,"_source":17,"_file":267,"_stem":268,"_extension":20},"/python/nested-loops","Nested Loops","Learn how to use nested loops to process multi-dimensional data, create patterns, and handle complex iteration scenarios","nested-loops",28,"content:python:28.nested-loops.md","python/28.nested-loops.md","python/28.nested-loops",{"_path":270,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":271,"description":272,"slug":273,"order":274,"isParent":13,"icon":14,"_type":15,"_id":275,"_source":17,"_file":276,"_stem":277,"_extension":20,"children":278,"expanded":13},"/python/python-lists","Python Lists","Learn about Python lists, one of the most important and versatile data structures for storing and organizing collections of data","python-lists",29,"content:python:29.python-lists.md","python/29.python-lists.md","python/29.python-lists",[279,288,297,306,315,324,333,342,351,360],{"_path":280,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":281,"description":282,"slug":283,"parentId":270,"order":284,"_type":15,"_id":285,"_source":17,"_file":286,"_stem":287,"_extension":20},"/python/creating-lists","Creating Lists","Learn different methods to create and initialize Python lists, from simple literals to advanced techniques","creating-lists",30,"content:python:30.creating-lists.md","python/30.creating-lists.md","python/30.creating-lists",{"_path":289,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":290,"description":291,"slug":292,"parentId":270,"order":293,"_type":15,"_id":294,"_source":17,"_file":295,"_stem":296,"_extension":20},"/python/reading-list-data","Reading List Data","Master techniques for accessing and retrieving data from Python lists using indexing, slicing, and built-in methods","reading-list-data",31,"content:python:31.reading-list-data.md","python/31.reading-list-data.md","python/31.reading-list-data",{"_path":298,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":299,"description":300,"slug":301,"parentId":270,"order":302,"_type":15,"_id":303,"_source":17,"_file":304,"_stem":305,"_extension":20},"/python/modifying-lists","Modifying Lists","Learn how to change, update, and modify existing elements in Python lists using indexing and various methods","modifying-lists",32,"content:python:32.modifying-lists.md","python/32.modifying-lists.md","python/32.modifying-lists",{"_path":307,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":308,"description":309,"slug":310,"parentId":270,"order":311,"_type":15,"_id":312,"_source":17,"_file":313,"_stem":314,"_extension":20},"/python/adding-to-lists","Adding to Lists","Learn various methods to add elements to Python lists including append, insert, extend, and concatenation techniques","adding-to-lists",33,"content:python:33.adding-to-lists.md","python/33.adding-to-lists.md","python/33.adding-to-lists",{"_path":316,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":317,"description":318,"slug":319,"parentId":270,"order":320,"_type":15,"_id":321,"_source":17,"_file":322,"_stem":323,"_extension":20},"/python/removing-from-lists","Removing from Lists","Learn different methods to remove and delete elements from Python lists including remove, pop, del, and clear","removing-from-lists",34,"content:python:34.removing-from-lists.md","python/34.removing-from-lists.md","python/34.removing-from-lists",{"_path":325,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":326,"description":327,"slug":328,"parentId":270,"order":329,"_type":15,"_id":330,"_source":17,"_file":331,"_stem":332,"_extension":20},"/python/looping-through-lists","Looping Through Lists","Learn different ways to iterate through Python lists using for loops, while loops, enumerate, and other iteration techniques","looping-through-lists",35,"content:python:35.looping-through-lists.md","python/35.looping-through-lists.md","python/35.looping-through-lists",{"_path":334,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":335,"description":336,"slug":337,"parentId":270,"order":338,"_type":15,"_id":339,"_source":17,"_file":340,"_stem":341,"_extension":20},"/python/list-shortcuts","List Shortcuts","Learn powerful Python list shortcuts including list comprehensions, slicing tricks, and built-in functions for efficient list operations","list-shortcuts",36,"content:python:36.list-shortcuts.md","python/36.list-shortcuts.md","python/36.list-shortcuts",{"_path":343,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":344,"description":345,"slug":346,"parentId":270,"order":347,"_type":15,"_id":348,"_source":17,"_file":349,"_stem":350,"_extension":20},"/python/organizing-lists","Organizing Lists","Learn how to sort, reverse, and organize Python lists using built-in methods and custom sorting techniques","organizing-lists",37,"content:python:37.organizing-lists.md","python/37.organizing-lists.md","python/37.organizing-lists",{"_path":352,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":353,"description":354,"slug":355,"parentId":270,"order":356,"_type":15,"_id":357,"_source":17,"_file":358,"_stem":359,"_extension":20},"/python/combining-lists","Combining Lists","Learn various techniques to combine, merge, and join Python lists including concatenation, zipping, and advanced merging strategies","combining-lists",38,"content:python:38.combining-lists.md","python/38.combining-lists.md","python/38.combining-lists",{"_path":361,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":362,"description":363,"slug":364,"parentId":270,"order":365,"_type":15,"_id":366,"_source":17,"_file":367,"_stem":368,"_extension":20},"/python/essential-list-tools","Essential List Tools","Master powerful built-in functions and advanced techniques for efficient Python list manipulation and data processing","essential-list-tools",39,"content:python:39.essential-list-tools.md","python/39.essential-list-tools.md","python/39.essential-list-tools",{"_path":370,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":371,"description":372,"slug":373,"order":374,"isParent":13,"icon":14,"_type":15,"_id":375,"_source":17,"_file":376,"_stem":377,"_extension":20,"children":378,"expanded":13},"/python/python-tuples","Python Tuples","Master Python tuples - immutable sequences perfect for storing related data that shouldn't change. Learn creation, access, and manipulation techniques.","python-tuples",40,"content:python:40.python-tuples.md","python/40.python-tuples.md","python/40.python-tuples",[379,388,397,406,415,424,433],{"_path":380,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":381,"description":382,"slug":383,"parentId":370,"order":384,"_type":15,"_id":385,"_source":17,"_file":386,"_stem":387,"_extension":20},"/python/creating-tuples","Creating Tuples","Learn different ways to create Python tuples, from basic syntax to advanced techniques. Master tuple initialization and understand when to use tuples.","creating-tuples",41,"content:python:41.creating-tuples.md","python/41.creating-tuples.md","python/41.creating-tuples",{"_path":389,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":390,"description":391,"slug":392,"parentId":370,"order":393,"_type":15,"_id":394,"_source":17,"_file":395,"_stem":396,"_extension":20},"/python/reading-tuple-data","Reading Tuple Data","Master accessing tuple elements through indexing, slicing, and searching. Learn efficient patterns for reading and working with tuple data.","reading-tuple-data",42,"content:python:42.reading-tuple-data.md","python/42.reading-tuple-data.md","python/42.reading-tuple-data",{"_path":398,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":399,"description":400,"slug":401,"parentId":370,"order":402,"_type":15,"_id":403,"_source":17,"_file":404,"_stem":405,"_extension":20},"/python/changing-tuples","Changing Tuples","Understand tuple immutability and learn techniques for working with unchangeable data. Master creating modified tuple versions and handling immutable constraints.","changing-tuples",43,"content:python:43.changing-tuples.md","python/43.changing-tuples.md","python/43.changing-tuples",{"_path":407,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":408,"description":409,"slug":410,"parentId":370,"order":411,"_type":15,"_id":412,"_source":17,"_file":413,"_stem":414,"_extension":20},"/python/tuple-unpacking","Tuple Unpacking","Master tuple unpacking for elegant variable assignment, function returns, and data extraction. Learn Python's powerful unpacking syntax and patterns.","tuple-unpacking",44,"content:python:44.tuple-unpacking.md","python/44.tuple-unpacking.md","python/44.tuple-unpacking",{"_path":416,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":417,"description":418,"slug":419,"parentId":370,"order":420,"_type":15,"_id":421,"_source":17,"_file":422,"_stem":423,"_extension":20},"/python/iterating-tuples","Iterating Tuples","Master tuple iteration techniques for processing sequence data. Learn basic loops, enumerate, nested iteration, and advanced patterns for efficient data processing.","iterating-tuples",45,"content:python:45.iterating-tuples.md","python/45.iterating-tuples.md","python/45.iterating-tuples",{"_path":425,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":426,"description":427,"slug":428,"parentId":370,"order":429,"_type":15,"_id":430,"_source":17,"_file":431,"_stem":432,"_extension":20},"/python/merging-tuples","Merging Tuples","Learn techniques for combining and merging tuples to create larger data structures. Master concatenation, joining multiple tuples, and advanced merging patterns.","merging-tuples",46,"content:python:46.merging-tuples.md","python/46.merging-tuples.md","python/46.merging-tuples",{"_path":434,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":435,"description":436,"slug":437,"parentId":370,"order":438,"_type":15,"_id":439,"_source":17,"_file":440,"_stem":441,"_extension":20},"/python/tuple-operations","Tuple Operations","Master comprehensive tuple operations including built-in functions, mathematical operations, comparisons, and advanced techniques for efficient tuple manipulation.","tuple-operations",47,"content:python:47.tuple-operations.md","python/47.tuple-operations.md","python/47.tuple-operations",{"_path":443,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":444,"description":445,"slug":446,"order":447,"isParent":13,"icon":14,"_type":15,"_id":448,"_source":17,"_file":449,"_stem":450,"_extension":20,"children":451,"expanded":13},"/python/python-sets","Python Sets","Discover Python sets - unique collections that automatically eliminate duplicates and provide powerful mathematical operations for data filtering and analysis.","python-sets",48,"content:python:48.python-sets.md","python/48.python-sets.md","python/48.python-sets",[452,461,470,479,488,497,506],{"_path":453,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":454,"description":455,"slug":456,"parentId":443,"order":457,"_type":15,"_id":458,"_source":17,"_file":459,"_stem":460,"_extension":20},"/python/creating-sets","Creating Sets","Learn multiple ways to create sets in Python including literal syntax, set() function, and set comprehensions. Master set creation from different data sources.","creating-sets",49,"content:python:49.creating-sets.md","python/49.creating-sets.md","python/49.creating-sets",{"_path":462,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":463,"description":464,"slug":465,"parentId":443,"order":466,"_type":15,"_id":467,"_source":17,"_file":468,"_stem":469,"_extension":20},"/python/reading-set-data","Reading Set Data","Learn how to access and examine set data in Python including membership testing, iteration, size checking, and converting sets to other data types.","reading-set-data",50,"content:python:50.reading-set-data.md","python/50.reading-set-data.md","python/50.reading-set-data",{"_path":471,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":472,"description":473,"slug":474,"parentId":443,"order":475,"_type":15,"_id":476,"_source":17,"_file":477,"_stem":478,"_extension":20},"/python/adding-to-sets","Adding to Sets","Learn how to add elements to sets in Python using add(), update(), and union operations. Master growing sets dynamically with single items and multiple elements.","adding-to-sets",51,"content:python:51.adding-to-sets.md","python/51.adding-to-sets.md","python/51.adding-to-sets",{"_path":480,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":481,"description":482,"slug":483,"parentId":443,"order":484,"_type":15,"_id":485,"_source":17,"_file":486,"_stem":487,"_extension":20},"/python/removing-from-sets","Removing from Sets","Learn how to remove elements from Python sets using different methods like remove(), discard(), pop(), and clear()","removing-from-sets",52,"content:python:52.removing-from-sets.md","python/52.removing-from-sets.md","python/52.removing-from-sets",{"_path":489,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":490,"description":491,"slug":492,"parentId":443,"order":493,"_type":15,"_id":494,"_source":17,"_file":495,"_stem":496,"_extension":20},"/python/iterating-sets","Iterating Sets","Learn different ways to iterate through Python sets using for loops, comprehensions, and built-in functions","iterating-sets",53,"content:python:53.iterating-sets.md","python/53.iterating-sets.md","python/53.iterating-sets",{"_path":498,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":499,"description":500,"slug":501,"parentId":443,"order":502,"_type":15,"_id":503,"_source":17,"_file":504,"_stem":505,"_extension":20},"/python/combining-sets","Combining Sets","Learn how to combine Python sets using union, intersection, difference, and other set operations","combining-sets",54,"content:python:54.combining-sets.md","python/54.combining-sets.md","python/54.combining-sets",{"_path":507,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":508,"description":509,"slug":510,"parentId":443,"order":511,"_type":15,"_id":512,"_source":17,"_file":513,"_stem":514,"_extension":20},"/python/set-operations","Set Operations","Learn advanced Python set operations including comparisons, subsets, supersets, and mathematical set relationships","set-operations",55,"content:python:55.set-operations.md","python/55.set-operations.md","python/55.set-operations",{"_path":516,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":517,"description":518,"slug":519,"order":520,"isParent":13,"icon":14,"_type":15,"_id":521,"_source":17,"_file":522,"_stem":523,"_extension":20,"children":524,"expanded":13},"/python/python-dictionaries","Python Dictionaries","Learn about Python dictionaries - key-value data structures for storing and organizing related information","python-dictionaries",56,"content:python:56.python-dictionaries.md","python/56.python-dictionaries.md","python/56.python-dictionaries",[525,534,543,552,561,570,579,588,597],{"_path":526,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":527,"description":528,"slug":529,"parentId":516,"order":530,"_type":15,"_id":531,"_source":17,"_file":532,"_stem":533,"_extension":20},"/python/creating-dictionaries","Creating Dictionaries","Learn different methods to create Python dictionaries using literals, constructors, and comprehensions","creating-dictionaries",57,"content:python:57.creating-dictionaries.md","python/57.creating-dictionaries.md","python/57.creating-dictionaries",{"_path":535,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":536,"description":537,"slug":538,"parentId":516,"order":539,"_type":15,"_id":540,"_source":17,"_file":541,"_stem":542,"_extension":20},"/python/getting-dictionary-values","Getting Dictionary Values","Learn safe and efficient methods to retrieve data from Python dictionaries using various access techniques","getting-dictionary-values",58,"content:python:58.getting-dictionary-values.md","python/58.getting-dictionary-values.md","python/58.getting-dictionary-values",{"_path":544,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":545,"description":546,"slug":547,"parentId":516,"order":548,"_type":15,"_id":549,"_source":17,"_file":550,"_stem":551,"_extension":20},"/python/updating-dictionaries","Updating Dictionaries","Learn how to modify and maintain Python dictionary data using various update methods and techniques","updating-dictionaries",59,"content:python:59.updating-dictionaries.md","python/59.updating-dictionaries.md","python/59.updating-dictionaries",{"_path":553,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":554,"description":555,"slug":556,"parentId":516,"order":557,"_type":15,"_id":558,"_source":17,"_file":559,"_stem":560,"_extension":20},"/python/adding-dictionary-items","Adding Dictionary Items","Learn effective techniques for adding new items to Python dictionaries with various methods and best practices","adding-dictionary-items",60,"content:python:60.adding-dictionary-items.md","python/60.adding-dictionary-items.md","python/60.adding-dictionary-items",{"_path":562,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":563,"description":564,"slug":565,"parentId":516,"order":566,"_type":15,"_id":567,"_source":17,"_file":568,"_stem":569,"_extension":20},"/python/deleting-dictionary-items","Deleting Dictionary Items","Master safe and efficient techniques for removing items from Python dictionaries with various methods and error handling","deleting-dictionary-items",61,"content:python:61.deleting-dictionary-items.md","python/61.deleting-dictionary-items.md","python/61.deleting-dictionary-items",{"_path":571,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":572,"description":573,"slug":574,"parentId":516,"order":575,"_type":15,"_id":576,"_source":17,"_file":577,"_stem":578,"_extension":20},"/python/looping-dictionaries","Looping Dictionaries","Learn efficient techniques for iterating through Python dictionaries using keys, values, and items","looping-dictionaries",62,"content:python:62.looping-dictionaries.md","python/62.looping-dictionaries.md","python/62.looping-dictionaries",{"_path":580,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":581,"description":582,"slug":583,"parentId":516,"order":584,"_type":15,"_id":585,"_source":17,"_file":586,"_stem":587,"_extension":20},"/python/dictionary-copies","Dictionary Copies","Learn safe techniques for duplicating Python dictionaries using shallow and deep copy methods","dictionary-copies",63,"content:python:63.dictionary-copies.md","python/63.dictionary-copies.md","python/63.dictionary-copies",{"_path":589,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":590,"description":591,"slug":592,"parentId":516,"order":593,"_type":15,"_id":594,"_source":17,"_file":595,"_stem":596,"_extension":20},"/python/multi-level-dictionaries","Multi-level Dictionaries","Master working with nested Python dictionaries for complex data structures and hierarchical information","multi-level-dictionaries",64,"content:python:64.multi-level-dictionaries.md","python/64.multi-level-dictionaries.md","python/64.multi-level-dictionaries",{"_path":598,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":599,"description":600,"slug":601,"parentId":516,"order":602,"_type":15,"_id":603,"_source":17,"_file":604,"_stem":605,"_extension":20},"/python/dictionary-tools","Dictionary Tools","Explore powerful built-in functions and advanced techniques for efficient Python dictionary manipulation and analysis","dictionary-tools",65,"content:python:65.dictionary-tools.md","python/65.dictionary-tools.md","python/65.dictionary-tools",{"_path":607,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":608,"description":609,"slug":610,"order":611,"isParent":13,"icon":14,"_type":15,"_id":612,"_source":17,"_file":613,"_stem":614,"_extension":20,"children":615,"expanded":13},"/python/python-functions","Python Functions","Learn how to create and use Python functions to organize code into reusable, modular components that make programs more efficient and maintainable","python-functions",66,"content:python:66.python-functions.md","python/66.python-functions.md","python/66.python-functions",[616,625,634,643,652,661],{"_path":617,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":618,"description":619,"slug":620,"parentId":607,"order":621,"_type":15,"_id":622,"_source":17,"_file":623,"_stem":624,"_extension":20},"/python/function-basics","Function Basics","Learn the fundamentals of creating and using Python functions to organize code into reusable, modular components","function-basics",67,"content:python:67.function-basics.md","python/67.function-basics.md","python/67.function-basics",{"_path":626,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":627,"description":628,"slug":629,"parentId":607,"order":630,"_type":15,"_id":631,"_source":17,"_file":632,"_stem":633,"_extension":20},"/python/function-parameters","Function Parameters","Master different types of Python function parameters including positional, keyword, default, and variable-length arguments","function-parameters",68,"content:python:68.function-parameters.md","python/68.function-parameters.md","python/68.function-parameters",{"_path":635,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":636,"description":637,"slug":638,"parentId":607,"order":639,"_type":15,"_id":640,"_source":17,"_file":641,"_stem":642,"_extension":20},"/python/returning-values","Returning Values","Learn different ways Python functions return data including single values, multiple values, and conditional returns","returning-values",69,"content:python:69.returning-values.md","python/69.returning-values.md","python/69.returning-values",{"_path":644,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":645,"description":646,"slug":647,"parentId":607,"order":648,"_type":15,"_id":649,"_source":17,"_file":650,"_stem":651,"_extension":20},"/python/variable-scope","Variable Scope","Understand Python variable scope including local, global, and nonlocal variables and how they affect function behavior","variable-scope",70,"content:python:70.variable-scope.md","python/70.variable-scope.md","python/70.variable-scope",{"_path":653,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":654,"description":655,"slug":656,"parentId":607,"order":657,"_type":15,"_id":658,"_source":17,"_file":659,"_stem":660,"_extension":20},"/python/anonymous-functions","Anonymous Functions","Learn to create and use Python lambda functions for concise, inline function definitions and functional programming patterns","anonymous-functions",71,"content:python:71.anonymous-functions.md","python/71.anonymous-functions.md","python/71.anonymous-functions",{"_path":662,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":663,"description":664,"slug":665,"parentId":607,"order":666,"_type":15,"_id":667,"_source":17,"_file":668,"_stem":669,"_extension":20},"/python/function-recursion","Function Recursion","Master recursive functions in Python by learning how functions can call themselves to solve complex problems with elegant, mathematical solutions","function-recursion",72,"content:python:72.function-recursion.md","python/72.function-recursion.md","python/72.function-recursion",{"_path":671,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":672,"description":673,"slug":674,"order":675,"isParent":13,"icon":14,"_type":15,"_id":676,"_source":17,"_file":677,"_stem":678,"_extension":20,"children":679,"expanded":13},"/python/object-programming","Object Programming","Learn object-oriented programming (OOP) in Python - create classes, objects, and methods to build organized, reusable code","object-programming",73,"content:python:73.object-programming.md","python/73.object-programming.md","python/73.object-programming",[680,689,698,707,716,725],{"_path":681,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":682,"description":683,"slug":684,"parentId":671,"order":685,"_type":15,"_id":686,"_source":17,"_file":687,"_stem":688,"_extension":20},"/python/classes-and-objects","Classes and Objects","Learn to create Python classes and objects - the foundation of object-oriented programming for building reusable, organized code","classes-and-objects",74,"content:python:74.classes-and-objects.md","python/74.classes-and-objects.md","python/74.classes-and-objects",{"_path":690,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":691,"description":692,"slug":693,"parentId":671,"order":694,"_type":15,"_id":695,"_source":17,"_file":696,"_stem":697,"_extension":20},"/python/object-methods","Object Methods","Master object methods in Python - learn to define behaviors, work with parameters, and create interactive objects that respond to actions","object-methods",75,"content:python:75.object-methods.md","python/75.object-methods.md","python/75.object-methods",{"_path":699,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":700,"description":701,"slug":702,"parentId":671,"order":703,"_type":15,"_id":704,"_source":17,"_file":705,"_stem":706,"_extension":20},"/python/class-inheritance","Class Inheritance","Learn Python class inheritance - create specialized classes that build upon existing functionality while adding new features and behaviors","class-inheritance",76,"content:python:76.class-inheritance.md","python/76.class-inheritance.md","python/76.class-inheritance",{"_path":708,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":709,"description":710,"slug":711,"parentId":671,"order":712,"_type":15,"_id":713,"_source":17,"_file":714,"_stem":715,"_extension":20},"/python/method-overriding","Method Overriding","Master method overriding in Python - learn to customize inherited methods, use super(), and create specialized behaviors while maintaining inheritance benefits","method-overriding",77,"content:python:77.method-overriding.md","python/77.method-overriding.md","python/77.method-overriding",{"_path":717,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":718,"description":719,"slug":720,"parentId":671,"order":721,"_type":15,"_id":722,"_source":17,"_file":723,"_stem":724,"_extension":20},"/python/variable-visibility","Variable Visibility","Master Python variable visibility - learn public, protected, and private attributes to control access and create well-encapsulated classes","variable-visibility",78,"content:python:78.variable-visibility.md","python/78.variable-visibility.md","python/78.variable-visibility",{"_path":726,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":727,"description":728,"slug":729,"parentId":671,"order":730,"_type":15,"_id":731,"_source":17,"_file":732,"_stem":733,"_extension":20},"/python/special-methods","Special Methods","Master Python special methods (magic methods) - learn to implement __str__, __len__, __eq__ and more to make your classes work seamlessly with Python's built-in functions","special-methods",79,"content:python:79.special-methods.md","python/79.special-methods.md","python/79.special-methods",{"_path":735,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":736,"description":737,"slug":738,"order":739,"isParent":13,"icon":14,"_type":15,"_id":740,"_source":17,"_file":741,"_stem":742,"_extension":20,"children":743},"/python/advanced-concepts","Advanced Concepts","Master advanced Python programming concepts - work with dates, mathematics, JSON data, pattern matching, and more sophisticated programming techniques","advanced-concepts",80,"content:python:80.advanced-concepts.md","python/80.advanced-concepts.md","python/80.advanced-concepts",[744,753,762,771,780,789,798],{"_path":745,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":746,"description":747,"slug":748,"parentId":735,"order":749,"_type":15,"_id":750,"_source":17,"_file":751,"_stem":752,"_extension":20},"/python/working-with-dates","Working with Dates","Master Python date and time handling - work with datetime objects, format dates, calculate durations, and build time-aware applications","working-with-dates",81,"content:python:81.working-with-dates.md","python/81.working-with-dates.md","python/81.working-with-dates",{"_path":754,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":755,"description":756,"slug":757,"parentId":735,"order":758,"_type":15,"_id":759,"_source":17,"_file":760,"_stem":761,"_extension":20},"/python/mathematical-operations","Mathematical Operations","Master Python mathematical computing - use math functions, perform statistical calculations, and implement scientific computing for data analysis and problem-solving","mathematical-operations",82,"content:python:82.mathematical-operations.md","python/82.mathematical-operations.md","python/82.mathematical-operations",{"_path":763,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":764,"description":765,"slug":766,"parentId":735,"order":767,"_type":15,"_id":768,"_source":17,"_file":769,"_stem":770,"_extension":20},"/python/json-data","JSON Data","Master JSON data handling in Python - serialize and deserialize data, work with APIs, manage configuration files, and exchange data between applications","json-data",83,"content:python:83.json-data.md","python/83.json-data.md","python/83.json-data",{"_path":772,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":773,"description":774,"slug":775,"parentId":735,"order":776,"_type":15,"_id":777,"_source":17,"_file":778,"_stem":779,"_extension":20},"/python/package-management","Package Management","Master Python package management with pip and virtual environments - install libraries, manage dependencies, create isolated environments, and distribute packages professionally","package-management",85,"content:python:85.package-management.md","python/85.package-management.md","python/85.package-management",{"_path":781,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":782,"description":783,"slug":784,"parentId":735,"order":785,"_type":15,"_id":786,"_source":17,"_file":787,"_stem":788,"_extension":20},"/python/error-handling","Error Handling","Master Python error handling with try/except blocks, exception types, custom exceptions, debugging techniques, and best practices for robust application development","error-handling",86,"content:python:86.error-handling.md","python/86.error-handling.md","python/86.error-handling",{"_path":790,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":791,"description":792,"slug":793,"parentId":735,"order":794,"_type":15,"_id":795,"_source":17,"_file":796,"_stem":797,"_extension":20},"/python/getting-user-input","Getting User Input","Master user input handling in Python with input validation, data type conversion, interactive programs, and command-line interfaces for engaging user experiences","getting-user-input",87,"content:python:87.getting-user-input.md","python/87.getting-user-input.md","python/87.getting-user-input",{"_path":799,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":800,"description":801,"slug":802,"parentId":735,"order":803,"_type":15,"_id":804,"_source":17,"_file":805,"_stem":806,"_extension":20},"/python/text-formatting","Text Formatting","Master Python text formatting with f-strings, format methods, alignment, number formatting, and advanced techniques for professional, readable output","text-formatting",88,"content:python:88.text-formatting.md","python/88.text-formatting.md","python/88.text-formatting",{"_path":808,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":809,"description":810,"slug":811,"order":812,"isParent":13,"icon":14,"_type":15,"_id":813,"_source":17,"_file":814,"_stem":815,"_extension":20,"children":816},"/python/file-operations","File Operations","Master Python file handling with reading, writing, and managing files for data persistence and real-world applications","file-operations",89,"content:python:89.file-operations.md","python/89.file-operations.md","python/89.file-operations",[817,826,835,844],{"_path":818,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":819,"description":820,"slug":821,"parentId":808,"order":822,"_type":15,"_id":823,"_source":17,"_file":824,"_stem":825,"_extension":20},"/python/file-basics","File Basics","Learn fundamental Python file operations including opening files, understanding file modes, using context managers, and basic file handling concepts","file-basics",90,"content:python:90.file-basics.md","python/90.file-basics.md","python/90.file-basics",{"_path":827,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":828,"description":829,"slug":830,"parentId":808,"order":831,"_type":15,"_id":832,"_source":17,"_file":833,"_stem":834,"_extension":20},"/python/reading-files","Reading Files","Master Python file reading techniques including reading entire files, line-by-line processing, and handling different file formats for efficient data processing","reading-files",91,"content:python:91.reading-files.md","python/91.reading-files.md","python/91.reading-files",{"_path":836,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":837,"description":838,"slug":839,"parentId":808,"order":840,"_type":15,"_id":841,"_source":17,"_file":842,"_stem":843,"_extension":20},"/python/writing-files","Writing Files","Learn Python file writing techniques including creating new files, appending content, updating existing files, and saving different data formats safely","writing-files",92,"content:python:92.writing-files.md","python/92.writing-files.md","python/92.writing-files",{"_path":845,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":846,"description":847,"slug":848,"parentId":808,"order":849,"_type":15,"_id":850,"_source":17,"_file":851,"_stem":852,"_extension":20},"/python/file-management","File Management","Learn Python file management techniques including checking file properties, organizing files, directory operations, and implementing file system maintenance tasks","file-management",93,"content:python:93.file-management.md","python/93.file-management.md","python/93.file-management",{"_path":854,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":855,"description":856,"slug":857,"order":858,"isParent":13,"icon":14,"_type":15,"_id":859,"_source":17,"_file":860,"_stem":861,"_extension":20,"children":862},"/python/code-organization","Code Organization","Master Python code organization with modules, built-in libraries, and path management for creating maintainable and reusable applications","code-organization",94,"content:python:94.code-organization.md","python/94.code-organization.md","python/94.code-organization",[863,872,881],{"_path":864,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":865,"description":866,"slug":867,"parentId":854,"order":868,"_type":15,"_id":869,"_source":17,"_file":870,"_stem":871,"_extension":20},"/python/creating-modules","Creating Modules","Learn how to create custom Python modules, organize functions and classes, write reusable code components, and design effective module structures","creating-modules",95,"content:python:95.creating-modules.md","python/95.creating-modules.md","python/95.creating-modules",{"_path":873,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":874,"description":875,"slug":876,"parentId":854,"order":877,"_type":15,"_id":878,"_source":17,"_file":879,"_stem":880,"_extension":20},"/python/using-built-in-modules","Using Built-in Modules","Discover Python's extensive standard library and learn to effectively use built-in modules for common programming tasks, data processing, and system operations","using-built-in-modules",96,"content:python:96.using-built-in-modules.md","python/96.using-built-in-modules.md","python/96.using-built-in-modules",{"_path":882,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":883,"description":884,"slug":885,"parentId":854,"order":886,"_type":15,"_id":887,"_source":17,"_file":888,"_stem":889,"_extension":20},"/python/module-paths","Module Paths","Understand Python's module search system, manage import paths, work with packages, and organize larger projects with proper module path management","module-paths",97,"content:python:97.module-paths.md","python/97.module-paths.md","python/97.module-paths",{"_path":891,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":892,"description":893,"slug":894,"order":895,"isParent":13,"icon":14,"_type":15,"_id":896,"_source":17,"_file":897,"_stem":898,"_extension":20,"children":899,"expanded":13},"/python/reference-materials","Reference Materials","Comprehensive Python reference materials including reserved words, built-in functions, and operation guides for quick lookup and development support","reference-materials",98,"content:python:98.reference-materials.md","python/98.reference-materials.md","python/98.reference-materials",[900,909,918,927,936,945,953,961,970],{"_path":901,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":902,"description":903,"slug":904,"parentId":891,"order":905,"_type":15,"_id":906,"_source":17,"_file":907,"_stem":908,"_extension":20},"/python/reserved-words","Reserved Words","Complete reference of Python keywords and reserved words with descriptions, usage examples, and syntax guidelines","reserved-words",99,"content:python:99.reserved-words.md","python/99.reserved-words.md","python/99.reserved-words",{"_path":910,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":911,"description":912,"slug":913,"parentId":891,"order":914,"_type":15,"_id":915,"_source":17,"_file":916,"_stem":917,"_extension":20},"/python/built-in-functions","Built-in Functions","Comprehensive reference of Python's built-in functions with parameters, return values, and practical usage examples","built-in-functions",100,"content:python:100.built-in-functions.md","python/100.built-in-functions.md","python/100.built-in-functions",{"_path":919,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":920,"description":921,"slug":922,"parentId":891,"order":923,"_type":15,"_id":924,"_source":17,"_file":925,"_stem":926,"_extension":20},"/python/string-operations","String Operations","Complete reference of Python string methods, operations, and formatting techniques with examples and use cases","string-operations",101,"content:python:101.string-operations.md","python/101.string-operations.md","python/101.string-operations",{"_path":928,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":929,"description":930,"slug":931,"parentId":891,"order":932,"_type":15,"_id":933,"_source":17,"_file":934,"_stem":935,"_extension":20},"/python/list-operations","List Operations","Complete reference of Python list methods, operations, and manipulation techniques with examples and performance notes","list-operations",102,"content:python:102.list-operations.md","python/102.list-operations.md","python/102.list-operations",{"_path":937,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":938,"description":939,"slug":940,"parentId":891,"order":941,"_type":15,"_id":942,"_source":17,"_file":943,"_stem":944,"_extension":20},"/python/dictionary-operations","Dictionary Operations","Complete reference of Python dictionary methods, operations, and manipulation techniques with examples and use cases","dictionary-operations",103,"content:python:103.dictionary-operations.md","python/103.dictionary-operations.md","python/103.dictionary-operations",{"_path":946,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":435,"description":947,"slug":948,"parentId":891,"order":949,"_type":15,"_id":950,"_source":17,"_file":951,"_stem":952,"_extension":20},"/python/tuple-methods","Complete reference of Python tuple operations, methods, and techniques with examples and use cases","tuple-methods",104,"content:python:104.tuple-methods.md","python/104.tuple-methods.md","python/104.tuple-methods",{"_path":954,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":508,"description":955,"slug":956,"parentId":891,"order":957,"_type":15,"_id":958,"_source":17,"_file":959,"_stem":960,"_extension":20},"/python/set-methods","Complete reference of Python set operations, methods, and mathematical set operations with examples and use cases","set-methods",105,"content:python:105.set-methods.md","python/105.set-methods.md","python/105.set-methods",{"_path":962,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":963,"description":964,"slug":965,"parentId":891,"order":966,"_type":15,"_id":967,"_source":17,"_file":968,"_stem":969,"_extension":20},"/python/file-operations-reference","File Operations Reference","Complete reference of Python file operations, modes, methods, and file handling techniques with examples","file-operations-reference",106,"content:python:106.file-operations-reference.md","python/106.file-operations-reference.md","python/106.file-operations-reference",{"_path":971,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":972,"description":973,"slug":974,"parentId":891,"order":975,"_type":15,"_id":976,"_source":17,"_file":977,"_stem":978,"_extension":20},"/python/error-types","Error Types","Complete reference of Python exception types, error handling patterns, and debugging techniques with examples","error-types",107,"content:python:107.error-types.md","python/107.error-types.md","python/107.error-types",{"_path":980,"_dir":8,"_draft":7,"_partial":7,"_locale":8,"title":981,"description":10,"slug":982,"order":983,"icon":14,"_type":15,"_id":984,"_source":17,"_file":985,"_stem":986,"_extension":20},"/python","Introduction","python-tutorial",0,"content:python:index.md","python/index.md","python/index",[680],{"_path":681,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":682,"description":683,"slug":684,"parentId":671,"order":685,"body":989,"_type":15,"_id":686,"_source":17,"_file":687,"_stem":688,"_extension":20},{"type":990,"children":991,"toc":6881},"root",[992,1000,1006,1011,1391,1398,1403,1519,1526,1538,1845,1858,1869,2297,2303,2308,2399,2405,2410,2977,2983,2988,2994,2999,3395,3401,3406,3880,3886,3891,4050,4056,4061,4067,4072,4511,4517,4522,5046,5052,5156,5162,5846,5908,5913,6288,6294,6834,6840,6845,6852,6858,6863,6875],{"type":993,"tag":994,"props":995,"children":996},"element","h1",{"id":684},[997],{"type":998,"value":999},"text","🏭 Classes and Objects",{"type":993,"tag":1001,"props":1002,"children":1003},"p",{},[1004],{"type":998,"value":1005},"Classes and objects are the building blocks of object-oriented programming in Python. A class acts like a blueprint or template that defines what data and actions an object can have, while an object is a specific instance created from that blueprint. Understanding this relationship opens the door to writing more organized, reusable code.",{"type":993,"tag":1001,"props":1007,"children":1008},{},[1009],{"type":998,"value":1010},"Think of classes like cookie cutters and objects like the actual cookies - one cutter can make many cookies, each with the same shape but potentially different decorations.",{"type":993,"tag":1012,"props":1013,"children":1014},"code-try",{},[1015],{"type":993,"tag":1016,"props":1017,"children":1020},"pre",{"className":1018,"code":1019,"language":6,"meta":8,"style":8},"language-python shiki shiki-themes github-light github-dark","# Creating a simple class and objects\nclass Car:\n    def __init__(self, brand, color):\n        self.brand = brand\n        self.color = color\n    \n    def start(self):\n        return f\"The {self.color} {self.brand} is starting!\"\n\n# Create objects from the class\nmy_car = Car(\"Toyota\", \"red\")\nfriend_car = Car(\"Honda\", \"blue\")\n\nprint(my_car.start())\nprint(f\"My car: {my_car.brand}\")\nprint(f\"Friend's car: {friend_car.color}\")\n",[1021],{"type":993,"tag":1022,"props":1023,"children":1024},"code",{"__ignoreMap":8},[1025,1036,1057,1076,1099,1120,1128,1145,1198,1206,1214,1251,1285,1292,1305,1350],{"type":993,"tag":1026,"props":1027,"children":1029},"span",{"class":1028,"line":12},"line",[1030],{"type":993,"tag":1026,"props":1031,"children":1033},{"style":1032},"--shiki-default:#6A737D;--shiki-app-dark-mode:#6A737D",[1034],{"type":998,"value":1035},"# Creating a simple class and objects\n",{"type":993,"tag":1026,"props":1037,"children":1038},{"class":1028,"line":27},[1039,1045,1051],{"type":993,"tag":1026,"props":1040,"children":1042},{"style":1041},"--shiki-default:#D73A49;--shiki-app-dark-mode:#F97583",[1043],{"type":998,"value":1044},"class",{"type":993,"tag":1026,"props":1046,"children":1048},{"style":1047},"--shiki-default:#6F42C1;--shiki-app-dark-mode:#B392F0",[1049],{"type":998,"value":1050}," Car",{"type":993,"tag":1026,"props":1052,"children":1054},{"style":1053},"--shiki-default:#24292E;--shiki-app-dark-mode:#E1E4E8",[1055],{"type":998,"value":1056},":\n",{"type":993,"tag":1026,"props":1058,"children":1059},{"class":1028,"line":36},[1060,1065,1071],{"type":993,"tag":1026,"props":1061,"children":1062},{"style":1041},[1063],{"type":998,"value":1064},"    def",{"type":993,"tag":1026,"props":1066,"children":1068},{"style":1067},"--shiki-default:#005CC5;--shiki-app-dark-mode:#79B8FF",[1069],{"type":998,"value":1070}," __init__",{"type":993,"tag":1026,"props":1072,"children":1073},{"style":1053},[1074],{"type":998,"value":1075},"(self, brand, color):\n",{"type":993,"tag":1026,"props":1077,"children":1078},{"class":1028,"line":45},[1079,1084,1089,1094],{"type":993,"tag":1026,"props":1080,"children":1081},{"style":1067},[1082],{"type":998,"value":1083},"        self",{"type":993,"tag":1026,"props":1085,"children":1086},{"style":1053},[1087],{"type":998,"value":1088},".brand ",{"type":993,"tag":1026,"props":1090,"children":1091},{"style":1041},[1092],{"type":998,"value":1093},"=",{"type":993,"tag":1026,"props":1095,"children":1096},{"style":1053},[1097],{"type":998,"value":1098}," brand\n",{"type":993,"tag":1026,"props":1100,"children":1101},{"class":1028,"line":54},[1102,1106,1111,1115],{"type":993,"tag":1026,"props":1103,"children":1104},{"style":1067},[1105],{"type":998,"value":1083},{"type":993,"tag":1026,"props":1107,"children":1108},{"style":1053},[1109],{"type":998,"value":1110},".color ",{"type":993,"tag":1026,"props":1112,"children":1113},{"style":1041},[1114],{"type":998,"value":1093},{"type":993,"tag":1026,"props":1116,"children":1117},{"style":1053},[1118],{"type":998,"value":1119}," color\n",{"type":993,"tag":1026,"props":1121,"children":1122},{"class":1028,"line":63},[1123],{"type":993,"tag":1026,"props":1124,"children":1125},{"style":1053},[1126],{"type":998,"value":1127},"    \n",{"type":993,"tag":1026,"props":1129,"children":1130},{"class":1028,"line":72},[1131,1135,1140],{"type":993,"tag":1026,"props":1132,"children":1133},{"style":1041},[1134],{"type":998,"value":1064},{"type":993,"tag":1026,"props":1136,"children":1137},{"style":1047},[1138],{"type":998,"value":1139}," start",{"type":993,"tag":1026,"props":1141,"children":1142},{"style":1053},[1143],{"type":998,"value":1144},"(self):\n",{"type":993,"tag":1026,"props":1146,"children":1147},{"class":1028,"line":81},[1148,1153,1158,1164,1169,1174,1179,1184,1189,1193],{"type":993,"tag":1026,"props":1149,"children":1150},{"style":1041},[1151],{"type":998,"value":1152},"        return",{"type":993,"tag":1026,"props":1154,"children":1155},{"style":1041},[1156],{"type":998,"value":1157}," f",{"type":993,"tag":1026,"props":1159,"children":1161},{"style":1160},"--shiki-default:#032F62;--shiki-app-dark-mode:#9ECBFF",[1162],{"type":998,"value":1163},"\"The ",{"type":993,"tag":1026,"props":1165,"children":1166},{"style":1067},[1167],{"type":998,"value":1168},"{self",{"type":993,"tag":1026,"props":1170,"children":1171},{"style":1053},[1172],{"type":998,"value":1173},".color",{"type":993,"tag":1026,"props":1175,"children":1176},{"style":1067},[1177],{"type":998,"value":1178},"}",{"type":993,"tag":1026,"props":1180,"children":1181},{"style":1067},[1182],{"type":998,"value":1183}," {self",{"type":993,"tag":1026,"props":1185,"children":1186},{"style":1053},[1187],{"type":998,"value":1188},".brand",{"type":993,"tag":1026,"props":1190,"children":1191},{"style":1067},[1192],{"type":998,"value":1178},{"type":993,"tag":1026,"props":1194,"children":1195},{"style":1160},[1196],{"type":998,"value":1197}," is starting!\"\n",{"type":993,"tag":1026,"props":1199,"children":1200},{"class":1028,"line":91},[1201],{"type":993,"tag":1026,"props":1202,"children":1203},{"emptyLinePlaceholder":13},[1204],{"type":998,"value":1205},"\n",{"type":993,"tag":1026,"props":1207,"children":1208},{"class":1028,"line":100},[1209],{"type":993,"tag":1026,"props":1210,"children":1211},{"style":1032},[1212],{"type":998,"value":1213},"# Create objects from the class\n",{"type":993,"tag":1026,"props":1215,"children":1216},{"class":1028,"line":109},[1217,1222,1226,1231,1236,1241,1246],{"type":993,"tag":1026,"props":1218,"children":1219},{"style":1053},[1220],{"type":998,"value":1221},"my_car ",{"type":993,"tag":1026,"props":1223,"children":1224},{"style":1041},[1225],{"type":998,"value":1093},{"type":993,"tag":1026,"props":1227,"children":1228},{"style":1053},[1229],{"type":998,"value":1230}," Car(",{"type":993,"tag":1026,"props":1232,"children":1233},{"style":1160},[1234],{"type":998,"value":1235},"\"Toyota\"",{"type":993,"tag":1026,"props":1237,"children":1238},{"style":1053},[1239],{"type":998,"value":1240},", ",{"type":993,"tag":1026,"props":1242,"children":1243},{"style":1160},[1244],{"type":998,"value":1245},"\"red\"",{"type":993,"tag":1026,"props":1247,"children":1248},{"style":1053},[1249],{"type":998,"value":1250},")\n",{"type":993,"tag":1026,"props":1252,"children":1253},{"class":1028,"line":118},[1254,1259,1263,1267,1272,1276,1281],{"type":993,"tag":1026,"props":1255,"children":1256},{"style":1053},[1257],{"type":998,"value":1258},"friend_car ",{"type":993,"tag":1026,"props":1260,"children":1261},{"style":1041},[1262],{"type":998,"value":1093},{"type":993,"tag":1026,"props":1264,"children":1265},{"style":1053},[1266],{"type":998,"value":1230},{"type":993,"tag":1026,"props":1268,"children":1269},{"style":1160},[1270],{"type":998,"value":1271},"\"Honda\"",{"type":993,"tag":1026,"props":1273,"children":1274},{"style":1053},[1275],{"type":998,"value":1240},{"type":993,"tag":1026,"props":1277,"children":1278},{"style":1160},[1279],{"type":998,"value":1280},"\"blue\"",{"type":993,"tag":1026,"props":1282,"children":1283},{"style":1053},[1284],{"type":998,"value":1250},{"type":993,"tag":1026,"props":1286,"children":1287},{"class":1028,"line":127},[1288],{"type":993,"tag":1026,"props":1289,"children":1290},{"emptyLinePlaceholder":13},[1291],{"type":998,"value":1205},{"type":993,"tag":1026,"props":1293,"children":1294},{"class":1028,"line":136},[1295,1300],{"type":993,"tag":1026,"props":1296,"children":1297},{"style":1067},[1298],{"type":998,"value":1299},"print",{"type":993,"tag":1026,"props":1301,"children":1302},{"style":1053},[1303],{"type":998,"value":1304},"(my_car.start())\n",{"type":993,"tag":1026,"props":1306,"children":1307},{"class":1028,"line":146},[1308,1312,1317,1322,1327,1332,1337,1341,1346],{"type":993,"tag":1026,"props":1309,"children":1310},{"style":1067},[1311],{"type":998,"value":1299},{"type":993,"tag":1026,"props":1313,"children":1314},{"style":1053},[1315],{"type":998,"value":1316},"(",{"type":993,"tag":1026,"props":1318,"children":1319},{"style":1041},[1320],{"type":998,"value":1321},"f",{"type":993,"tag":1026,"props":1323,"children":1324},{"style":1160},[1325],{"type":998,"value":1326},"\"My car: ",{"type":993,"tag":1026,"props":1328,"children":1329},{"style":1067},[1330],{"type":998,"value":1331},"{",{"type":993,"tag":1026,"props":1333,"children":1334},{"style":1053},[1335],{"type":998,"value":1336},"my_car.brand",{"type":993,"tag":1026,"props":1338,"children":1339},{"style":1067},[1340],{"type":998,"value":1178},{"type":993,"tag":1026,"props":1342,"children":1343},{"style":1160},[1344],{"type":998,"value":1345},"\"",{"type":993,"tag":1026,"props":1347,"children":1348},{"style":1053},[1349],{"type":998,"value":1250},{"type":993,"tag":1026,"props":1351,"children":1352},{"class":1028,"line":155},[1353,1357,1361,1365,1370,1374,1379,1383,1387],{"type":993,"tag":1026,"props":1354,"children":1355},{"style":1067},[1356],{"type":998,"value":1299},{"type":993,"tag":1026,"props":1358,"children":1359},{"style":1053},[1360],{"type":998,"value":1316},{"type":993,"tag":1026,"props":1362,"children":1363},{"style":1041},[1364],{"type":998,"value":1321},{"type":993,"tag":1026,"props":1366,"children":1367},{"style":1160},[1368],{"type":998,"value":1369},"\"Friend's car: ",{"type":993,"tag":1026,"props":1371,"children":1372},{"style":1067},[1373],{"type":998,"value":1331},{"type":993,"tag":1026,"props":1375,"children":1376},{"style":1053},[1377],{"type":998,"value":1378},"friend_car.color",{"type":993,"tag":1026,"props":1380,"children":1381},{"style":1067},[1382],{"type":998,"value":1178},{"type":993,"tag":1026,"props":1384,"children":1385},{"style":1160},[1386],{"type":998,"value":1345},{"type":993,"tag":1026,"props":1388,"children":1389},{"style":1053},[1390],{"type":998,"value":1250},{"type":993,"tag":1392,"props":1393,"children":1395},"h2",{"id":1394},"understanding-classes",[1396],{"type":998,"value":1397},"🎯 Understanding Classes",{"type":993,"tag":1001,"props":1399,"children":1400},{},[1401],{"type":998,"value":1402},"Classes define the structure and behavior that objects will have. They specify what attributes (data) objects can store and what methods (actions) objects can perform.",{"type":993,"tag":1404,"props":1405,"children":1409},"info-box",{"emoji":1406,"title":1407,"type":1408},"🏗️","Class Components","info",[1410,1419,1446,1454,1487,1495],{"type":993,"tag":1001,"props":1411,"children":1412},{},[1413],{"type":993,"tag":1414,"props":1415,"children":1416},"strong",{},[1417],{"type":998,"value":1418},"Class Definition:",{"type":993,"tag":1420,"props":1421,"children":1422},"ul",{},[1423,1436,1441],{"type":993,"tag":1424,"props":1425,"children":1426},"li",{},[1427,1429,1434],{"type":998,"value":1428},"Uses the ",{"type":993,"tag":1022,"props":1430,"children":1432},{"className":1431},[],[1433],{"type":998,"value":1044},{"type":998,"value":1435}," keyword followed by class name",{"type":993,"tag":1424,"props":1437,"children":1438},{},[1439],{"type":998,"value":1440},"Contains attributes (variables) and methods (functions)",{"type":993,"tag":1424,"props":1442,"children":1443},{},[1444],{"type":998,"value":1445},"Serves as a template for creating objects",{"type":993,"tag":1001,"props":1447,"children":1448},{},[1449],{"type":993,"tag":1414,"props":1450,"children":1451},{},[1452],{"type":998,"value":1453},"Naming Convention:",{"type":993,"tag":1420,"props":1455,"children":1456},{},[1457,1477,1482],{"type":993,"tag":1424,"props":1458,"children":1459},{},[1460,1462,1468,1469,1475],{"type":998,"value":1461},"Class names use PascalCase (e.g., ",{"type":993,"tag":1022,"props":1463,"children":1465},{"className":1464},[],[1466],{"type":998,"value":1467},"MyClass",{"type":998,"value":1240},{"type":993,"tag":1022,"props":1470,"children":1472},{"className":1471},[],[1473],{"type":998,"value":1474},"BankAccount",{"type":998,"value":1476},")",{"type":993,"tag":1424,"props":1478,"children":1479},{},[1480],{"type":998,"value":1481},"Should be descriptive nouns representing what the class models",{"type":993,"tag":1424,"props":1483,"children":1484},{},[1485],{"type":998,"value":1486},"Avoid abbreviations when possible",{"type":993,"tag":1001,"props":1488,"children":1489},{},[1490],{"type":993,"tag":1414,"props":1491,"children":1492},{},[1493],{"type":998,"value":1494},"Structure:",{"type":993,"tag":1420,"props":1496,"children":1497},{},[1498,1509,1514],{"type":993,"tag":1424,"props":1499,"children":1500},{},[1501,1507],{"type":993,"tag":1022,"props":1502,"children":1504},{"className":1503},[],[1505],{"type":998,"value":1506},"__init__",{"type":998,"value":1508}," method initializes new objects",{"type":993,"tag":1424,"props":1510,"children":1511},{},[1512],{"type":998,"value":1513},"Other methods define object behaviors",{"type":993,"tag":1424,"props":1515,"children":1516},{},[1517],{"type":998,"value":1518},"Attributes store object-specific data",{"type":993,"tag":1520,"props":1521,"children":1523},"h3",{"id":1522},"creating-your-first-class",[1524],{"type":998,"value":1525},"Creating Your First Class",{"type":993,"tag":1001,"props":1527,"children":1528},{},[1529,1531,1536],{"type":998,"value":1530},"Defining a class establishes the blueprint that determines what objects created from it will contain. The ",{"type":993,"tag":1022,"props":1532,"children":1534},{"className":1533},[],[1535],{"type":998,"value":1506},{"type":998,"value":1537}," method is special - it runs automatically when you create a new object, setting up the initial state.",{"type":993,"tag":1012,"props":1539,"children":1540},{},[1541],{"type":993,"tag":1016,"props":1542,"children":1544},{"className":1018,"code":1543,"language":6,"meta":8,"style":8},"class Person:\n    def __init__(self, name, age):\n        self.name = name  # Attribute\n        self.age = age    # Attribute\n    \n    def introduce(self):  # Method\n        return f\"Hi, I'm {self.name} and I'm {self.age} years old\"\n    \n    def have_birthday(self):  # Method\n        self.age += 1\n        return f\"Happy birthday! {self.name} is now {self.age}\"\n\n# The class is defined but no objects exist yet\nprint(\"Class Person has been created!\")\n",[1545],{"type":993,"tag":1022,"props":1546,"children":1547},{"__ignoreMap":8},[1548,1564,1580,1606,1631,1638,1660,1712,1719,1739,1760,1810,1817,1825],{"type":993,"tag":1026,"props":1549,"children":1550},{"class":1028,"line":12},[1551,1555,1560],{"type":993,"tag":1026,"props":1552,"children":1553},{"style":1041},[1554],{"type":998,"value":1044},{"type":993,"tag":1026,"props":1556,"children":1557},{"style":1047},[1558],{"type":998,"value":1559}," Person",{"type":993,"tag":1026,"props":1561,"children":1562},{"style":1053},[1563],{"type":998,"value":1056},{"type":993,"tag":1026,"props":1565,"children":1566},{"class":1028,"line":27},[1567,1571,1575],{"type":993,"tag":1026,"props":1568,"children":1569},{"style":1041},[1570],{"type":998,"value":1064},{"type":993,"tag":1026,"props":1572,"children":1573},{"style":1067},[1574],{"type":998,"value":1070},{"type":993,"tag":1026,"props":1576,"children":1577},{"style":1053},[1578],{"type":998,"value":1579},"(self, name, age):\n",{"type":993,"tag":1026,"props":1581,"children":1582},{"class":1028,"line":36},[1583,1587,1592,1596,1601],{"type":993,"tag":1026,"props":1584,"children":1585},{"style":1067},[1586],{"type":998,"value":1083},{"type":993,"tag":1026,"props":1588,"children":1589},{"style":1053},[1590],{"type":998,"value":1591},".name ",{"type":993,"tag":1026,"props":1593,"children":1594},{"style":1041},[1595],{"type":998,"value":1093},{"type":993,"tag":1026,"props":1597,"children":1598},{"style":1053},[1599],{"type":998,"value":1600}," name  ",{"type":993,"tag":1026,"props":1602,"children":1603},{"style":1032},[1604],{"type":998,"value":1605},"# Attribute\n",{"type":993,"tag":1026,"props":1607,"children":1608},{"class":1028,"line":45},[1609,1613,1618,1622,1627],{"type":993,"tag":1026,"props":1610,"children":1611},{"style":1067},[1612],{"type":998,"value":1083},{"type":993,"tag":1026,"props":1614,"children":1615},{"style":1053},[1616],{"type":998,"value":1617},".age ",{"type":993,"tag":1026,"props":1619,"children":1620},{"style":1041},[1621],{"type":998,"value":1093},{"type":993,"tag":1026,"props":1623,"children":1624},{"style":1053},[1625],{"type":998,"value":1626}," age    ",{"type":993,"tag":1026,"props":1628,"children":1629},{"style":1032},[1630],{"type":998,"value":1605},{"type":993,"tag":1026,"props":1632,"children":1633},{"class":1028,"line":54},[1634],{"type":993,"tag":1026,"props":1635,"children":1636},{"style":1053},[1637],{"type":998,"value":1127},{"type":993,"tag":1026,"props":1639,"children":1640},{"class":1028,"line":63},[1641,1645,1650,1655],{"type":993,"tag":1026,"props":1642,"children":1643},{"style":1041},[1644],{"type":998,"value":1064},{"type":993,"tag":1026,"props":1646,"children":1647},{"style":1047},[1648],{"type":998,"value":1649}," introduce",{"type":993,"tag":1026,"props":1651,"children":1652},{"style":1053},[1653],{"type":998,"value":1654},"(self):  ",{"type":993,"tag":1026,"props":1656,"children":1657},{"style":1032},[1658],{"type":998,"value":1659},"# Method\n",{"type":993,"tag":1026,"props":1661,"children":1662},{"class":1028,"line":72},[1663,1667,1671,1676,1680,1685,1689,1694,1698,1703,1707],{"type":993,"tag":1026,"props":1664,"children":1665},{"style":1041},[1666],{"type":998,"value":1152},{"type":993,"tag":1026,"props":1668,"children":1669},{"style":1041},[1670],{"type":998,"value":1157},{"type":993,"tag":1026,"props":1672,"children":1673},{"style":1160},[1674],{"type":998,"value":1675},"\"Hi, I'm ",{"type":993,"tag":1026,"props":1677,"children":1678},{"style":1067},[1679],{"type":998,"value":1168},{"type":993,"tag":1026,"props":1681,"children":1682},{"style":1053},[1683],{"type":998,"value":1684},".name",{"type":993,"tag":1026,"props":1686,"children":1687},{"style":1067},[1688],{"type":998,"value":1178},{"type":993,"tag":1026,"props":1690,"children":1691},{"style":1160},[1692],{"type":998,"value":1693}," and I'm ",{"type":993,"tag":1026,"props":1695,"children":1696},{"style":1067},[1697],{"type":998,"value":1168},{"type":993,"tag":1026,"props":1699,"children":1700},{"style":1053},[1701],{"type":998,"value":1702},".age",{"type":993,"tag":1026,"props":1704,"children":1705},{"style":1067},[1706],{"type":998,"value":1178},{"type":993,"tag":1026,"props":1708,"children":1709},{"style":1160},[1710],{"type":998,"value":1711}," years old\"\n",{"type":993,"tag":1026,"props":1713,"children":1714},{"class":1028,"line":81},[1715],{"type":993,"tag":1026,"props":1716,"children":1717},{"style":1053},[1718],{"type":998,"value":1127},{"type":993,"tag":1026,"props":1720,"children":1721},{"class":1028,"line":91},[1722,1726,1731,1735],{"type":993,"tag":1026,"props":1723,"children":1724},{"style":1041},[1725],{"type":998,"value":1064},{"type":993,"tag":1026,"props":1727,"children":1728},{"style":1047},[1729],{"type":998,"value":1730}," have_birthday",{"type":993,"tag":1026,"props":1732,"children":1733},{"style":1053},[1734],{"type":998,"value":1654},{"type":993,"tag":1026,"props":1736,"children":1737},{"style":1032},[1738],{"type":998,"value":1659},{"type":993,"tag":1026,"props":1740,"children":1741},{"class":1028,"line":100},[1742,1746,1750,1755],{"type":993,"tag":1026,"props":1743,"children":1744},{"style":1067},[1745],{"type":998,"value":1083},{"type":993,"tag":1026,"props":1747,"children":1748},{"style":1053},[1749],{"type":998,"value":1617},{"type":993,"tag":1026,"props":1751,"children":1752},{"style":1041},[1753],{"type":998,"value":1754},"+=",{"type":993,"tag":1026,"props":1756,"children":1757},{"style":1067},[1758],{"type":998,"value":1759}," 1\n",{"type":993,"tag":1026,"props":1761,"children":1762},{"class":1028,"line":109},[1763,1767,1771,1776,1780,1784,1788,1793,1797,1801,1805],{"type":993,"tag":1026,"props":1764,"children":1765},{"style":1041},[1766],{"type":998,"value":1152},{"type":993,"tag":1026,"props":1768,"children":1769},{"style":1041},[1770],{"type":998,"value":1157},{"type":993,"tag":1026,"props":1772,"children":1773},{"style":1160},[1774],{"type":998,"value":1775},"\"Happy birthday! ",{"type":993,"tag":1026,"props":1777,"children":1778},{"style":1067},[1779],{"type":998,"value":1168},{"type":993,"tag":1026,"props":1781,"children":1782},{"style":1053},[1783],{"type":998,"value":1684},{"type":993,"tag":1026,"props":1785,"children":1786},{"style":1067},[1787],{"type":998,"value":1178},{"type":993,"tag":1026,"props":1789,"children":1790},{"style":1160},[1791],{"type":998,"value":1792}," is now ",{"type":993,"tag":1026,"props":1794,"children":1795},{"style":1067},[1796],{"type":998,"value":1168},{"type":993,"tag":1026,"props":1798,"children":1799},{"style":1053},[1800],{"type":998,"value":1702},{"type":993,"tag":1026,"props":1802,"children":1803},{"style":1067},[1804],{"type":998,"value":1178},{"type":993,"tag":1026,"props":1806,"children":1807},{"style":1160},[1808],{"type":998,"value":1809},"\"\n",{"type":993,"tag":1026,"props":1811,"children":1812},{"class":1028,"line":118},[1813],{"type":993,"tag":1026,"props":1814,"children":1815},{"emptyLinePlaceholder":13},[1816],{"type":998,"value":1205},{"type":993,"tag":1026,"props":1818,"children":1819},{"class":1028,"line":127},[1820],{"type":993,"tag":1026,"props":1821,"children":1822},{"style":1032},[1823],{"type":998,"value":1824},"# The class is defined but no objects exist yet\n",{"type":993,"tag":1026,"props":1826,"children":1827},{"class":1028,"line":136},[1828,1832,1836,1841],{"type":993,"tag":1026,"props":1829,"children":1830},{"style":1067},[1831],{"type":998,"value":1299},{"type":993,"tag":1026,"props":1833,"children":1834},{"style":1053},[1835],{"type":998,"value":1316},{"type":993,"tag":1026,"props":1837,"children":1838},{"style":1160},[1839],{"type":998,"value":1840},"\"Class Person has been created!\"",{"type":993,"tag":1026,"props":1842,"children":1843},{"style":1053},[1844],{"type":998,"value":1250},{"type":993,"tag":1520,"props":1846,"children":1848},{"id":1847},"the-init-method",[1849,1851,1856],{"type":998,"value":1850},"The ",{"type":993,"tag":1414,"props":1852,"children":1853},{},[1854],{"type":998,"value":1855},"init",{"type":998,"value":1857}," Method",{"type":993,"tag":1001,"props":1859,"children":1860},{},[1861,1862,1867],{"type":998,"value":1850},{"type":993,"tag":1022,"props":1863,"children":1865},{"className":1864},[],[1866],{"type":998,"value":1506},{"type":998,"value":1868}," method is the constructor that initializes new objects with their starting values. This special method gets called automatically whenever you create an object from the class.",{"type":993,"tag":1012,"props":1870,"children":1871},{},[1872],{"type":993,"tag":1016,"props":1873,"children":1875},{"className":1018,"code":1874,"language":6,"meta":8,"style":8},"class Book:\n    def __init__(self, title, author, pages):\n        print(f\"Creating a new book: {title}\")\n        self.title = title\n        self.author = author\n        self.pages = pages\n        self.current_page = 1  # Default starting page\n    \n    def get_info(self):\n        return f\"'{self.title}' by {self.author} ({self.pages} pages)\"\n\n# __init__ runs automatically when creating objects\nbook1 = Book(\"Python Basics\", \"Jane Doe\", 200)\nbook2 = Book(\"Advanced Python\", \"John Smith\", 350)\n\nprint(book1.get_info())\nprint(f\"Current page: {book1.current_page}\")\n",[1876],{"type":993,"tag":1022,"props":1877,"children":1878},{"__ignoreMap":8},[1879,1895,1911,1953,1974,1995,2016,2042,2049,2065,2135,2142,2150,2194,2237,2244,2256],{"type":993,"tag":1026,"props":1880,"children":1881},{"class":1028,"line":12},[1882,1886,1891],{"type":993,"tag":1026,"props":1883,"children":1884},{"style":1041},[1885],{"type":998,"value":1044},{"type":993,"tag":1026,"props":1887,"children":1888},{"style":1047},[1889],{"type":998,"value":1890}," Book",{"type":993,"tag":1026,"props":1892,"children":1893},{"style":1053},[1894],{"type":998,"value":1056},{"type":993,"tag":1026,"props":1896,"children":1897},{"class":1028,"line":27},[1898,1902,1906],{"type":993,"tag":1026,"props":1899,"children":1900},{"style":1041},[1901],{"type":998,"value":1064},{"type":993,"tag":1026,"props":1903,"children":1904},{"style":1067},[1905],{"type":998,"value":1070},{"type":993,"tag":1026,"props":1907,"children":1908},{"style":1053},[1909],{"type":998,"value":1910},"(self, title, author, pages):\n",{"type":993,"tag":1026,"props":1912,"children":1913},{"class":1028,"line":36},[1914,1919,1923,1927,1932,1936,1941,1945,1949],{"type":993,"tag":1026,"props":1915,"children":1916},{"style":1067},[1917],{"type":998,"value":1918},"        print",{"type":993,"tag":1026,"props":1920,"children":1921},{"style":1053},[1922],{"type":998,"value":1316},{"type":993,"tag":1026,"props":1924,"children":1925},{"style":1041},[1926],{"type":998,"value":1321},{"type":993,"tag":1026,"props":1928,"children":1929},{"style":1160},[1930],{"type":998,"value":1931},"\"Creating a new book: ",{"type":993,"tag":1026,"props":1933,"children":1934},{"style":1067},[1935],{"type":998,"value":1331},{"type":993,"tag":1026,"props":1937,"children":1938},{"style":1053},[1939],{"type":998,"value":1940},"title",{"type":993,"tag":1026,"props":1942,"children":1943},{"style":1067},[1944],{"type":998,"value":1178},{"type":993,"tag":1026,"props":1946,"children":1947},{"style":1160},[1948],{"type":998,"value":1345},{"type":993,"tag":1026,"props":1950,"children":1951},{"style":1053},[1952],{"type":998,"value":1250},{"type":993,"tag":1026,"props":1954,"children":1955},{"class":1028,"line":45},[1956,1960,1965,1969],{"type":993,"tag":1026,"props":1957,"children":1958},{"style":1067},[1959],{"type":998,"value":1083},{"type":993,"tag":1026,"props":1961,"children":1962},{"style":1053},[1963],{"type":998,"value":1964},".title ",{"type":993,"tag":1026,"props":1966,"children":1967},{"style":1041},[1968],{"type":998,"value":1093},{"type":993,"tag":1026,"props":1970,"children":1971},{"style":1053},[1972],{"type":998,"value":1973}," title\n",{"type":993,"tag":1026,"props":1975,"children":1976},{"class":1028,"line":54},[1977,1981,1986,1990],{"type":993,"tag":1026,"props":1978,"children":1979},{"style":1067},[1980],{"type":998,"value":1083},{"type":993,"tag":1026,"props":1982,"children":1983},{"style":1053},[1984],{"type":998,"value":1985},".author ",{"type":993,"tag":1026,"props":1987,"children":1988},{"style":1041},[1989],{"type":998,"value":1093},{"type":993,"tag":1026,"props":1991,"children":1992},{"style":1053},[1993],{"type":998,"value":1994}," author\n",{"type":993,"tag":1026,"props":1996,"children":1997},{"class":1028,"line":63},[1998,2002,2007,2011],{"type":993,"tag":1026,"props":1999,"children":2000},{"style":1067},[2001],{"type":998,"value":1083},{"type":993,"tag":1026,"props":2003,"children":2004},{"style":1053},[2005],{"type":998,"value":2006},".pages ",{"type":993,"tag":1026,"props":2008,"children":2009},{"style":1041},[2010],{"type":998,"value":1093},{"type":993,"tag":1026,"props":2012,"children":2013},{"style":1053},[2014],{"type":998,"value":2015}," pages\n",{"type":993,"tag":1026,"props":2017,"children":2018},{"class":1028,"line":72},[2019,2023,2028,2032,2037],{"type":993,"tag":1026,"props":2020,"children":2021},{"style":1067},[2022],{"type":998,"value":1083},{"type":993,"tag":1026,"props":2024,"children":2025},{"style":1053},[2026],{"type":998,"value":2027},".current_page ",{"type":993,"tag":1026,"props":2029,"children":2030},{"style":1041},[2031],{"type":998,"value":1093},{"type":993,"tag":1026,"props":2033,"children":2034},{"style":1067},[2035],{"type":998,"value":2036}," 1",{"type":993,"tag":1026,"props":2038,"children":2039},{"style":1032},[2040],{"type":998,"value":2041},"  # Default starting page\n",{"type":993,"tag":1026,"props":2043,"children":2044},{"class":1028,"line":81},[2045],{"type":993,"tag":1026,"props":2046,"children":2047},{"style":1053},[2048],{"type":998,"value":1127},{"type":993,"tag":1026,"props":2050,"children":2051},{"class":1028,"line":91},[2052,2056,2061],{"type":993,"tag":1026,"props":2053,"children":2054},{"style":1041},[2055],{"type":998,"value":1064},{"type":993,"tag":1026,"props":2057,"children":2058},{"style":1047},[2059],{"type":998,"value":2060}," get_info",{"type":993,"tag":1026,"props":2062,"children":2063},{"style":1053},[2064],{"type":998,"value":1144},{"type":993,"tag":1026,"props":2066,"children":2067},{"class":1028,"line":100},[2068,2072,2076,2081,2085,2090,2094,2099,2103,2108,2112,2117,2121,2126,2130],{"type":993,"tag":1026,"props":2069,"children":2070},{"style":1041},[2071],{"type":998,"value":1152},{"type":993,"tag":1026,"props":2073,"children":2074},{"style":1041},[2075],{"type":998,"value":1157},{"type":993,"tag":1026,"props":2077,"children":2078},{"style":1160},[2079],{"type":998,"value":2080},"\"'",{"type":993,"tag":1026,"props":2082,"children":2083},{"style":1067},[2084],{"type":998,"value":1168},{"type":993,"tag":1026,"props":2086,"children":2087},{"style":1053},[2088],{"type":998,"value":2089},".title",{"type":993,"tag":1026,"props":2091,"children":2092},{"style":1067},[2093],{"type":998,"value":1178},{"type":993,"tag":1026,"props":2095,"children":2096},{"style":1160},[2097],{"type":998,"value":2098},"' by ",{"type":993,"tag":1026,"props":2100,"children":2101},{"style":1067},[2102],{"type":998,"value":1168},{"type":993,"tag":1026,"props":2104,"children":2105},{"style":1053},[2106],{"type":998,"value":2107},".author",{"type":993,"tag":1026,"props":2109,"children":2110},{"style":1067},[2111],{"type":998,"value":1178},{"type":993,"tag":1026,"props":2113,"children":2114},{"style":1160},[2115],{"type":998,"value":2116}," (",{"type":993,"tag":1026,"props":2118,"children":2119},{"style":1067},[2120],{"type":998,"value":1168},{"type":993,"tag":1026,"props":2122,"children":2123},{"style":1053},[2124],{"type":998,"value":2125},".pages",{"type":993,"tag":1026,"props":2127,"children":2128},{"style":1067},[2129],{"type":998,"value":1178},{"type":993,"tag":1026,"props":2131,"children":2132},{"style":1160},[2133],{"type":998,"value":2134}," pages)\"\n",{"type":993,"tag":1026,"props":2136,"children":2137},{"class":1028,"line":109},[2138],{"type":993,"tag":1026,"props":2139,"children":2140},{"emptyLinePlaceholder":13},[2141],{"type":998,"value":1205},{"type":993,"tag":1026,"props":2143,"children":2144},{"class":1028,"line":118},[2145],{"type":993,"tag":1026,"props":2146,"children":2147},{"style":1032},[2148],{"type":998,"value":2149},"# __init__ runs automatically when creating objects\n",{"type":993,"tag":1026,"props":2151,"children":2152},{"class":1028,"line":127},[2153,2158,2162,2167,2172,2176,2181,2185,2190],{"type":993,"tag":1026,"props":2154,"children":2155},{"style":1053},[2156],{"type":998,"value":2157},"book1 ",{"type":993,"tag":1026,"props":2159,"children":2160},{"style":1041},[2161],{"type":998,"value":1093},{"type":993,"tag":1026,"props":2163,"children":2164},{"style":1053},[2165],{"type":998,"value":2166}," Book(",{"type":993,"tag":1026,"props":2168,"children":2169},{"style":1160},[2170],{"type":998,"value":2171},"\"Python Basics\"",{"type":993,"tag":1026,"props":2173,"children":2174},{"style":1053},[2175],{"type":998,"value":1240},{"type":993,"tag":1026,"props":2177,"children":2178},{"style":1160},[2179],{"type":998,"value":2180},"\"Jane Doe\"",{"type":993,"tag":1026,"props":2182,"children":2183},{"style":1053},[2184],{"type":998,"value":1240},{"type":993,"tag":1026,"props":2186,"children":2187},{"style":1067},[2188],{"type":998,"value":2189},"200",{"type":993,"tag":1026,"props":2191,"children":2192},{"style":1053},[2193],{"type":998,"value":1250},{"type":993,"tag":1026,"props":2195,"children":2196},{"class":1028,"line":136},[2197,2202,2206,2210,2215,2219,2224,2228,2233],{"type":993,"tag":1026,"props":2198,"children":2199},{"style":1053},[2200],{"type":998,"value":2201},"book2 ",{"type":993,"tag":1026,"props":2203,"children":2204},{"style":1041},[2205],{"type":998,"value":1093},{"type":993,"tag":1026,"props":2207,"children":2208},{"style":1053},[2209],{"type":998,"value":2166},{"type":993,"tag":1026,"props":2211,"children":2212},{"style":1160},[2213],{"type":998,"value":2214},"\"Advanced Python\"",{"type":993,"tag":1026,"props":2216,"children":2217},{"style":1053},[2218],{"type":998,"value":1240},{"type":993,"tag":1026,"props":2220,"children":2221},{"style":1160},[2222],{"type":998,"value":2223},"\"John Smith\"",{"type":993,"tag":1026,"props":2225,"children":2226},{"style":1053},[2227],{"type":998,"value":1240},{"type":993,"tag":1026,"props":2229,"children":2230},{"style":1067},[2231],{"type":998,"value":2232},"350",{"type":993,"tag":1026,"props":2234,"children":2235},{"style":1053},[2236],{"type":998,"value":1250},{"type":993,"tag":1026,"props":2238,"children":2239},{"class":1028,"line":146},[2240],{"type":993,"tag":1026,"props":2241,"children":2242},{"emptyLinePlaceholder":13},[2243],{"type":998,"value":1205},{"type":993,"tag":1026,"props":2245,"children":2246},{"class":1028,"line":155},[2247,2251],{"type":993,"tag":1026,"props":2248,"children":2249},{"style":1067},[2250],{"type":998,"value":1299},{"type":993,"tag":1026,"props":2252,"children":2253},{"style":1053},[2254],{"type":998,"value":2255},"(book1.get_info())\n",{"type":993,"tag":1026,"props":2257,"children":2258},{"class":1028,"line":164},[2259,2263,2267,2271,2276,2280,2285,2289,2293],{"type":993,"tag":1026,"props":2260,"children":2261},{"style":1067},[2262],{"type":998,"value":1299},{"type":993,"tag":1026,"props":2264,"children":2265},{"style":1053},[2266],{"type":998,"value":1316},{"type":993,"tag":1026,"props":2268,"children":2269},{"style":1041},[2270],{"type":998,"value":1321},{"type":993,"tag":1026,"props":2272,"children":2273},{"style":1160},[2274],{"type":998,"value":2275},"\"Current page: ",{"type":993,"tag":1026,"props":2277,"children":2278},{"style":1067},[2279],{"type":998,"value":1331},{"type":993,"tag":1026,"props":2281,"children":2282},{"style":1053},[2283],{"type":998,"value":2284},"book1.current_page",{"type":993,"tag":1026,"props":2286,"children":2287},{"style":1067},[2288],{"type":998,"value":1178},{"type":993,"tag":1026,"props":2290,"children":2291},{"style":1160},[2292],{"type":998,"value":1345},{"type":993,"tag":1026,"props":2294,"children":2295},{"style":1053},[2296],{"type":998,"value":1250},{"type":993,"tag":1392,"props":2298,"children":2300},{"id":2299},"creating-objects-instantiation",[2301],{"type":998,"value":2302},"⚡ Creating Objects (Instantiation)",{"type":993,"tag":1001,"props":2304,"children":2305},{},[2306],{"type":998,"value":2307},"Objects are specific instances created from a class blueprint. Each object has its own copy of the attributes defined in the class, allowing multiple objects to exist independently with different data.",{"type":993,"tag":1404,"props":2309,"children":2313},{"emoji":2310,"title":2311,"type":2312},"🚀","Object Creation Process","success",[2314,2322,2352,2360,2378,2386],{"type":993,"tag":1001,"props":2315,"children":2316},{},[2317],{"type":993,"tag":1414,"props":2318,"children":2319},{},[2320],{"type":998,"value":2321},"Instantiation Steps:",{"type":993,"tag":2323,"props":2324,"children":2325},"ol",{},[2326,2331,2342,2347],{"type":993,"tag":1424,"props":2327,"children":2328},{},[2329],{"type":998,"value":2330},"Python allocates memory for the new object",{"type":993,"tag":1424,"props":2332,"children":2333},{},[2334,2335,2340],{"type":998,"value":1850},{"type":993,"tag":1022,"props":2336,"children":2338},{"className":2337},[],[2339],{"type":998,"value":1506},{"type":998,"value":2341}," method is called automatically",{"type":993,"tag":1424,"props":2343,"children":2344},{},[2345],{"type":998,"value":2346},"Attributes are set based on provided arguments",{"type":993,"tag":1424,"props":2348,"children":2349},{},[2350],{"type":998,"value":2351},"The new object is returned and can be assigned to a variable",{"type":993,"tag":1001,"props":2353,"children":2354},{},[2355],{"type":993,"tag":1414,"props":2356,"children":2357},{},[2358],{"type":998,"value":2359},"Multiple Objects:",{"type":993,"tag":1420,"props":2361,"children":2362},{},[2363,2368,2373],{"type":993,"tag":1424,"props":2364,"children":2365},{},[2366],{"type":998,"value":2367},"Each object is independent with its own attribute values",{"type":993,"tag":1424,"props":2369,"children":2370},{},[2371],{"type":998,"value":2372},"Changing one object doesn't affect others",{"type":993,"tag":1424,"props":2374,"children":2375},{},[2376],{"type":998,"value":2377},"Objects can interact with each other through methods",{"type":993,"tag":1001,"props":2379,"children":2380},{},[2381],{"type":993,"tag":1414,"props":2382,"children":2383},{},[2384],{"type":998,"value":2385},"Memory Management:",{"type":993,"tag":1420,"props":2387,"children":2388},{},[2389,2394],{"type":993,"tag":1424,"props":2390,"children":2391},{},[2392],{"type":998,"value":2393},"Python handles memory allocation automatically",{"type":993,"tag":1424,"props":2395,"children":2396},{},[2397],{"type":998,"value":2398},"Objects are garbage collected when no longer referenced",{"type":993,"tag":1520,"props":2400,"children":2402},{"id":2401},"creating-multiple-objects",[2403],{"type":998,"value":2404},"Creating Multiple Objects",{"type":993,"tag":1001,"props":2406,"children":2407},{},[2408],{"type":998,"value":2409},"Each object created from a class maintains its own independent set of attributes. This allows you to model multiple similar entities with different characteristics.",{"type":993,"tag":1012,"props":2411,"children":2412},{},[2413],{"type":993,"tag":1016,"props":2414,"children":2416},{"className":1018,"code":2415,"language":6,"meta":8,"style":8},"class Student:\n    def __init__(self, name, student_id, major):\n        self.name = name\n        self.student_id = student_id\n        self.major = major\n        self.grades = []  # Empty list for each student\n    \n    def add_grade(self, grade):\n        self.grades.append(grade)\n        return f\"Added grade {grade} for {self.name}\"\n    \n    def get_average(self):\n        if self.grades:\n            return sum(self.grades) / len(self.grades)\n        return 0\n\n# Create multiple independent student objects\nalice = Student(\"Alice\", \"S001\", \"Computer Science\")\nbob = Student(\"Bob\", \"S002\", \"Mathematics\")\n\nalice.add_grade(95)\nalice.add_grade(87)\nbob.add_grade(92)\n\nprint(f\"Alice's average: {alice.get_average()}\")\nprint(f\"Bob's average: {bob.get_average()}\")\n",[2417],{"type":993,"tag":1022,"props":2418,"children":2419},{"__ignoreMap":8},[2420,2436,2452,2472,2493,2514,2540,2547,2564,2576,2626,2633,2649,2667,2717,2729,2736,2744,2788,2831,2838,2855,2871,2888,2895,2936],{"type":993,"tag":1026,"props":2421,"children":2422},{"class":1028,"line":12},[2423,2427,2432],{"type":993,"tag":1026,"props":2424,"children":2425},{"style":1041},[2426],{"type":998,"value":1044},{"type":993,"tag":1026,"props":2428,"children":2429},{"style":1047},[2430],{"type":998,"value":2431}," Student",{"type":993,"tag":1026,"props":2433,"children":2434},{"style":1053},[2435],{"type":998,"value":1056},{"type":993,"tag":1026,"props":2437,"children":2438},{"class":1028,"line":27},[2439,2443,2447],{"type":993,"tag":1026,"props":2440,"children":2441},{"style":1041},[2442],{"type":998,"value":1064},{"type":993,"tag":1026,"props":2444,"children":2445},{"style":1067},[2446],{"type":998,"value":1070},{"type":993,"tag":1026,"props":2448,"children":2449},{"style":1053},[2450],{"type":998,"value":2451},"(self, name, student_id, major):\n",{"type":993,"tag":1026,"props":2453,"children":2454},{"class":1028,"line":36},[2455,2459,2463,2467],{"type":993,"tag":1026,"props":2456,"children":2457},{"style":1067},[2458],{"type":998,"value":1083},{"type":993,"tag":1026,"props":2460,"children":2461},{"style":1053},[2462],{"type":998,"value":1591},{"type":993,"tag":1026,"props":2464,"children":2465},{"style":1041},[2466],{"type":998,"value":1093},{"type":993,"tag":1026,"props":2468,"children":2469},{"style":1053},[2470],{"type":998,"value":2471}," name\n",{"type":993,"tag":1026,"props":2473,"children":2474},{"class":1028,"line":45},[2475,2479,2484,2488],{"type":993,"tag":1026,"props":2476,"children":2477},{"style":1067},[2478],{"type":998,"value":1083},{"type":993,"tag":1026,"props":2480,"children":2481},{"style":1053},[2482],{"type":998,"value":2483},".student_id ",{"type":993,"tag":1026,"props":2485,"children":2486},{"style":1041},[2487],{"type":998,"value":1093},{"type":993,"tag":1026,"props":2489,"children":2490},{"style":1053},[2491],{"type":998,"value":2492}," student_id\n",{"type":993,"tag":1026,"props":2494,"children":2495},{"class":1028,"line":54},[2496,2500,2505,2509],{"type":993,"tag":1026,"props":2497,"children":2498},{"style":1067},[2499],{"type":998,"value":1083},{"type":993,"tag":1026,"props":2501,"children":2502},{"style":1053},[2503],{"type":998,"value":2504},".major ",{"type":993,"tag":1026,"props":2506,"children":2507},{"style":1041},[2508],{"type":998,"value":1093},{"type":993,"tag":1026,"props":2510,"children":2511},{"style":1053},[2512],{"type":998,"value":2513}," major\n",{"type":993,"tag":1026,"props":2515,"children":2516},{"class":1028,"line":63},[2517,2521,2526,2530,2535],{"type":993,"tag":1026,"props":2518,"children":2519},{"style":1067},[2520],{"type":998,"value":1083},{"type":993,"tag":1026,"props":2522,"children":2523},{"style":1053},[2524],{"type":998,"value":2525},".grades ",{"type":993,"tag":1026,"props":2527,"children":2528},{"style":1041},[2529],{"type":998,"value":1093},{"type":993,"tag":1026,"props":2531,"children":2532},{"style":1053},[2533],{"type":998,"value":2534}," []  ",{"type":993,"tag":1026,"props":2536,"children":2537},{"style":1032},[2538],{"type":998,"value":2539},"# Empty list for each student\n",{"type":993,"tag":1026,"props":2541,"children":2542},{"class":1028,"line":72},[2543],{"type":993,"tag":1026,"props":2544,"children":2545},{"style":1053},[2546],{"type":998,"value":1127},{"type":993,"tag":1026,"props":2548,"children":2549},{"class":1028,"line":81},[2550,2554,2559],{"type":993,"tag":1026,"props":2551,"children":2552},{"style":1041},[2553],{"type":998,"value":1064},{"type":993,"tag":1026,"props":2555,"children":2556},{"style":1047},[2557],{"type":998,"value":2558}," add_grade",{"type":993,"tag":1026,"props":2560,"children":2561},{"style":1053},[2562],{"type":998,"value":2563},"(self, grade):\n",{"type":993,"tag":1026,"props":2565,"children":2566},{"class":1028,"line":91},[2567,2571],{"type":993,"tag":1026,"props":2568,"children":2569},{"style":1067},[2570],{"type":998,"value":1083},{"type":993,"tag":1026,"props":2572,"children":2573},{"style":1053},[2574],{"type":998,"value":2575},".grades.append(grade)\n",{"type":993,"tag":1026,"props":2577,"children":2578},{"class":1028,"line":100},[2579,2583,2587,2592,2596,2601,2605,2610,2614,2618,2622],{"type":993,"tag":1026,"props":2580,"children":2581},{"style":1041},[2582],{"type":998,"value":1152},{"type":993,"tag":1026,"props":2584,"children":2585},{"style":1041},[2586],{"type":998,"value":1157},{"type":993,"tag":1026,"props":2588,"children":2589},{"style":1160},[2590],{"type":998,"value":2591},"\"Added grade ",{"type":993,"tag":1026,"props":2593,"children":2594},{"style":1067},[2595],{"type":998,"value":1331},{"type":993,"tag":1026,"props":2597,"children":2598},{"style":1053},[2599],{"type":998,"value":2600},"grade",{"type":993,"tag":1026,"props":2602,"children":2603},{"style":1067},[2604],{"type":998,"value":1178},{"type":993,"tag":1026,"props":2606,"children":2607},{"style":1160},[2608],{"type":998,"value":2609}," for ",{"type":993,"tag":1026,"props":2611,"children":2612},{"style":1067},[2613],{"type":998,"value":1168},{"type":993,"tag":1026,"props":2615,"children":2616},{"style":1053},[2617],{"type":998,"value":1684},{"type":993,"tag":1026,"props":2619,"children":2620},{"style":1067},[2621],{"type":998,"value":1178},{"type":993,"tag":1026,"props":2623,"children":2624},{"style":1160},[2625],{"type":998,"value":1809},{"type":993,"tag":1026,"props":2627,"children":2628},{"class":1028,"line":109},[2629],{"type":993,"tag":1026,"props":2630,"children":2631},{"style":1053},[2632],{"type":998,"value":1127},{"type":993,"tag":1026,"props":2634,"children":2635},{"class":1028,"line":118},[2636,2640,2645],{"type":993,"tag":1026,"props":2637,"children":2638},{"style":1041},[2639],{"type":998,"value":1064},{"type":993,"tag":1026,"props":2641,"children":2642},{"style":1047},[2643],{"type":998,"value":2644}," get_average",{"type":993,"tag":1026,"props":2646,"children":2647},{"style":1053},[2648],{"type":998,"value":1144},{"type":993,"tag":1026,"props":2650,"children":2651},{"class":1028,"line":127},[2652,2657,2662],{"type":993,"tag":1026,"props":2653,"children":2654},{"style":1041},[2655],{"type":998,"value":2656},"        if",{"type":993,"tag":1026,"props":2658,"children":2659},{"style":1067},[2660],{"type":998,"value":2661}," self",{"type":993,"tag":1026,"props":2663,"children":2664},{"style":1053},[2665],{"type":998,"value":2666},".grades:\n",{"type":993,"tag":1026,"props":2668,"children":2669},{"class":1028,"line":136},[2670,2675,2680,2684,2689,2694,2699,2704,2708,2712],{"type":993,"tag":1026,"props":2671,"children":2672},{"style":1041},[2673],{"type":998,"value":2674},"            return",{"type":993,"tag":1026,"props":2676,"children":2677},{"style":1067},[2678],{"type":998,"value":2679}," sum",{"type":993,"tag":1026,"props":2681,"children":2682},{"style":1053},[2683],{"type":998,"value":1316},{"type":993,"tag":1026,"props":2685,"children":2686},{"style":1067},[2687],{"type":998,"value":2688},"self",{"type":993,"tag":1026,"props":2690,"children":2691},{"style":1053},[2692],{"type":998,"value":2693},".grades) ",{"type":993,"tag":1026,"props":2695,"children":2696},{"style":1041},[2697],{"type":998,"value":2698},"/",{"type":993,"tag":1026,"props":2700,"children":2701},{"style":1067},[2702],{"type":998,"value":2703}," len",{"type":993,"tag":1026,"props":2705,"children":2706},{"style":1053},[2707],{"type":998,"value":1316},{"type":993,"tag":1026,"props":2709,"children":2710},{"style":1067},[2711],{"type":998,"value":2688},{"type":993,"tag":1026,"props":2713,"children":2714},{"style":1053},[2715],{"type":998,"value":2716},".grades)\n",{"type":993,"tag":1026,"props":2718,"children":2719},{"class":1028,"line":146},[2720,2724],{"type":993,"tag":1026,"props":2721,"children":2722},{"style":1041},[2723],{"type":998,"value":1152},{"type":993,"tag":1026,"props":2725,"children":2726},{"style":1067},[2727],{"type":998,"value":2728}," 0\n",{"type":993,"tag":1026,"props":2730,"children":2731},{"class":1028,"line":155},[2732],{"type":993,"tag":1026,"props":2733,"children":2734},{"emptyLinePlaceholder":13},[2735],{"type":998,"value":1205},{"type":993,"tag":1026,"props":2737,"children":2738},{"class":1028,"line":164},[2739],{"type":993,"tag":1026,"props":2740,"children":2741},{"style":1032},[2742],{"type":998,"value":2743},"# Create multiple independent student objects\n",{"type":993,"tag":1026,"props":2745,"children":2746},{"class":1028,"line":173},[2747,2752,2756,2761,2766,2770,2775,2779,2784],{"type":993,"tag":1026,"props":2748,"children":2749},{"style":1053},[2750],{"type":998,"value":2751},"alice ",{"type":993,"tag":1026,"props":2753,"children":2754},{"style":1041},[2755],{"type":998,"value":1093},{"type":993,"tag":1026,"props":2757,"children":2758},{"style":1053},[2759],{"type":998,"value":2760}," Student(",{"type":993,"tag":1026,"props":2762,"children":2763},{"style":1160},[2764],{"type":998,"value":2765},"\"Alice\"",{"type":993,"tag":1026,"props":2767,"children":2768},{"style":1053},[2769],{"type":998,"value":1240},{"type":993,"tag":1026,"props":2771,"children":2772},{"style":1160},[2773],{"type":998,"value":2774},"\"S001\"",{"type":993,"tag":1026,"props":2776,"children":2777},{"style":1053},[2778],{"type":998,"value":1240},{"type":993,"tag":1026,"props":2780,"children":2781},{"style":1160},[2782],{"type":998,"value":2783},"\"Computer Science\"",{"type":993,"tag":1026,"props":2785,"children":2786},{"style":1053},[2787],{"type":998,"value":1250},{"type":993,"tag":1026,"props":2789,"children":2790},{"class":1028,"line":182},[2791,2796,2800,2804,2809,2813,2818,2822,2827],{"type":993,"tag":1026,"props":2792,"children":2793},{"style":1053},[2794],{"type":998,"value":2795},"bob ",{"type":993,"tag":1026,"props":2797,"children":2798},{"style":1041},[2799],{"type":998,"value":1093},{"type":993,"tag":1026,"props":2801,"children":2802},{"style":1053},[2803],{"type":998,"value":2760},{"type":993,"tag":1026,"props":2805,"children":2806},{"style":1160},[2807],{"type":998,"value":2808},"\"Bob\"",{"type":993,"tag":1026,"props":2810,"children":2811},{"style":1053},[2812],{"type":998,"value":1240},{"type":993,"tag":1026,"props":2814,"children":2815},{"style":1160},[2816],{"type":998,"value":2817},"\"S002\"",{"type":993,"tag":1026,"props":2819,"children":2820},{"style":1053},[2821],{"type":998,"value":1240},{"type":993,"tag":1026,"props":2823,"children":2824},{"style":1160},[2825],{"type":998,"value":2826},"\"Mathematics\"",{"type":993,"tag":1026,"props":2828,"children":2829},{"style":1053},[2830],{"type":998,"value":1250},{"type":993,"tag":1026,"props":2832,"children":2833},{"class":1028,"line":191},[2834],{"type":993,"tag":1026,"props":2835,"children":2836},{"emptyLinePlaceholder":13},[2837],{"type":998,"value":1205},{"type":993,"tag":1026,"props":2839,"children":2840},{"class":1028,"line":201},[2841,2846,2851],{"type":993,"tag":1026,"props":2842,"children":2843},{"style":1053},[2844],{"type":998,"value":2845},"alice.add_grade(",{"type":993,"tag":1026,"props":2847,"children":2848},{"style":1067},[2849],{"type":998,"value":2850},"95",{"type":993,"tag":1026,"props":2852,"children":2853},{"style":1053},[2854],{"type":998,"value":1250},{"type":993,"tag":1026,"props":2856,"children":2857},{"class":1028,"line":210},[2858,2862,2867],{"type":993,"tag":1026,"props":2859,"children":2860},{"style":1053},[2861],{"type":998,"value":2845},{"type":993,"tag":1026,"props":2863,"children":2864},{"style":1067},[2865],{"type":998,"value":2866},"87",{"type":993,"tag":1026,"props":2868,"children":2869},{"style":1053},[2870],{"type":998,"value":1250},{"type":993,"tag":1026,"props":2872,"children":2873},{"class":1028,"line":219},[2874,2879,2884],{"type":993,"tag":1026,"props":2875,"children":2876},{"style":1053},[2877],{"type":998,"value":2878},"bob.add_grade(",{"type":993,"tag":1026,"props":2880,"children":2881},{"style":1067},[2882],{"type":998,"value":2883},"92",{"type":993,"tag":1026,"props":2885,"children":2886},{"style":1053},[2887],{"type":998,"value":1250},{"type":993,"tag":1026,"props":2889,"children":2890},{"class":1028,"line":228},[2891],{"type":993,"tag":1026,"props":2892,"children":2893},{"emptyLinePlaceholder":13},[2894],{"type":998,"value":1205},{"type":993,"tag":1026,"props":2896,"children":2897},{"class":1028,"line":238},[2898,2902,2906,2910,2915,2919,2924,2928,2932],{"type":993,"tag":1026,"props":2899,"children":2900},{"style":1067},[2901],{"type":998,"value":1299},{"type":993,"tag":1026,"props":2903,"children":2904},{"style":1053},[2905],{"type":998,"value":1316},{"type":993,"tag":1026,"props":2907,"children":2908},{"style":1041},[2909],{"type":998,"value":1321},{"type":993,"tag":1026,"props":2911,"children":2912},{"style":1160},[2913],{"type":998,"value":2914},"\"Alice's average: ",{"type":993,"tag":1026,"props":2916,"children":2917},{"style":1067},[2918],{"type":998,"value":1331},{"type":993,"tag":1026,"props":2920,"children":2921},{"style":1053},[2922],{"type":998,"value":2923},"alice.get_average()",{"type":993,"tag":1026,"props":2925,"children":2926},{"style":1067},[2927],{"type":998,"value":1178},{"type":993,"tag":1026,"props":2929,"children":2930},{"style":1160},[2931],{"type":998,"value":1345},{"type":993,"tag":1026,"props":2933,"children":2934},{"style":1053},[2935],{"type":998,"value":1250},{"type":993,"tag":1026,"props":2937,"children":2938},{"class":1028,"line":247},[2939,2943,2947,2951,2956,2960,2965,2969,2973],{"type":993,"tag":1026,"props":2940,"children":2941},{"style":1067},[2942],{"type":998,"value":1299},{"type":993,"tag":1026,"props":2944,"children":2945},{"style":1053},[2946],{"type":998,"value":1316},{"type":993,"tag":1026,"props":2948,"children":2949},{"style":1041},[2950],{"type":998,"value":1321},{"type":993,"tag":1026,"props":2952,"children":2953},{"style":1160},[2954],{"type":998,"value":2955},"\"Bob's average: ",{"type":993,"tag":1026,"props":2957,"children":2958},{"style":1067},[2959],{"type":998,"value":1331},{"type":993,"tag":1026,"props":2961,"children":2962},{"style":1053},[2963],{"type":998,"value":2964},"bob.get_average()",{"type":993,"tag":1026,"props":2966,"children":2967},{"style":1067},[2968],{"type":998,"value":1178},{"type":993,"tag":1026,"props":2970,"children":2971},{"style":1160},[2972],{"type":998,"value":1345},{"type":993,"tag":1026,"props":2974,"children":2975},{"style":1053},[2976],{"type":998,"value":1250},{"type":993,"tag":1392,"props":2978,"children":2980},{"id":2979},"accessing-attributes-and-methods",[2981],{"type":998,"value":2982},"🚀 Accessing Attributes and Methods",{"type":993,"tag":1001,"props":2984,"children":2985},{},[2986],{"type":998,"value":2987},"Objects expose their attributes and methods through dot notation, allowing you to retrieve data and trigger behaviors. Understanding how to properly access object members is essential for effective object manipulation.",{"type":993,"tag":1520,"props":2989,"children":2991},{"id":2990},"attribute-access",[2992],{"type":998,"value":2993},"Attribute Access",{"type":993,"tag":1001,"props":2995,"children":2996},{},[2997],{"type":998,"value":2998},"Object attributes can be read and modified using dot notation. This provides direct access to the object's internal data for both retrieval and updates.",{"type":993,"tag":1012,"props":3000,"children":3001},{},[3002],{"type":993,"tag":1016,"props":3003,"children":3005},{"className":1018,"code":3004,"language":6,"meta":8,"style":8},"class Rectangle:\n    def __init__(self, width, height):\n        self.width = width\n        self.height = height\n    \n    def area(self):\n        return self.width * self.height\n\n# Create object and access attributes\nrect = Rectangle(5, 3)\n\n# Read attributes\nprint(f\"Width: {rect.width}\")\nprint(f\"Height: {rect.height}\")\n\n# Modify attributes\nrect.width = 7\nprint(f\"New width: {rect.width}\")\nprint(f\"New area: {rect.area()}\")\n",[3006],{"type":993,"tag":1022,"props":3007,"children":3008},{"__ignoreMap":8},[3009,3025,3041,3062,3083,3090,3106,3135,3142,3150,3185,3192,3200,3241,3282,3289,3297,3314,3354],{"type":993,"tag":1026,"props":3010,"children":3011},{"class":1028,"line":12},[3012,3016,3021],{"type":993,"tag":1026,"props":3013,"children":3014},{"style":1041},[3015],{"type":998,"value":1044},{"type":993,"tag":1026,"props":3017,"children":3018},{"style":1047},[3019],{"type":998,"value":3020}," Rectangle",{"type":993,"tag":1026,"props":3022,"children":3023},{"style":1053},[3024],{"type":998,"value":1056},{"type":993,"tag":1026,"props":3026,"children":3027},{"class":1028,"line":27},[3028,3032,3036],{"type":993,"tag":1026,"props":3029,"children":3030},{"style":1041},[3031],{"type":998,"value":1064},{"type":993,"tag":1026,"props":3033,"children":3034},{"style":1067},[3035],{"type":998,"value":1070},{"type":993,"tag":1026,"props":3037,"children":3038},{"style":1053},[3039],{"type":998,"value":3040},"(self, width, height):\n",{"type":993,"tag":1026,"props":3042,"children":3043},{"class":1028,"line":36},[3044,3048,3053,3057],{"type":993,"tag":1026,"props":3045,"children":3046},{"style":1067},[3047],{"type":998,"value":1083},{"type":993,"tag":1026,"props":3049,"children":3050},{"style":1053},[3051],{"type":998,"value":3052},".width ",{"type":993,"tag":1026,"props":3054,"children":3055},{"style":1041},[3056],{"type":998,"value":1093},{"type":993,"tag":1026,"props":3058,"children":3059},{"style":1053},[3060],{"type":998,"value":3061}," width\n",{"type":993,"tag":1026,"props":3063,"children":3064},{"class":1028,"line":45},[3065,3069,3074,3078],{"type":993,"tag":1026,"props":3066,"children":3067},{"style":1067},[3068],{"type":998,"value":1083},{"type":993,"tag":1026,"props":3070,"children":3071},{"style":1053},[3072],{"type":998,"value":3073},".height ",{"type":993,"tag":1026,"props":3075,"children":3076},{"style":1041},[3077],{"type":998,"value":1093},{"type":993,"tag":1026,"props":3079,"children":3080},{"style":1053},[3081],{"type":998,"value":3082}," height\n",{"type":993,"tag":1026,"props":3084,"children":3085},{"class":1028,"line":54},[3086],{"type":993,"tag":1026,"props":3087,"children":3088},{"style":1053},[3089],{"type":998,"value":1127},{"type":993,"tag":1026,"props":3091,"children":3092},{"class":1028,"line":63},[3093,3097,3102],{"type":993,"tag":1026,"props":3094,"children":3095},{"style":1041},[3096],{"type":998,"value":1064},{"type":993,"tag":1026,"props":3098,"children":3099},{"style":1047},[3100],{"type":998,"value":3101}," area",{"type":993,"tag":1026,"props":3103,"children":3104},{"style":1053},[3105],{"type":998,"value":1144},{"type":993,"tag":1026,"props":3107,"children":3108},{"class":1028,"line":72},[3109,3113,3117,3121,3126,3130],{"type":993,"tag":1026,"props":3110,"children":3111},{"style":1041},[3112],{"type":998,"value":1152},{"type":993,"tag":1026,"props":3114,"children":3115},{"style":1067},[3116],{"type":998,"value":2661},{"type":993,"tag":1026,"props":3118,"children":3119},{"style":1053},[3120],{"type":998,"value":3052},{"type":993,"tag":1026,"props":3122,"children":3123},{"style":1041},[3124],{"type":998,"value":3125},"*",{"type":993,"tag":1026,"props":3127,"children":3128},{"style":1067},[3129],{"type":998,"value":2661},{"type":993,"tag":1026,"props":3131,"children":3132},{"style":1053},[3133],{"type":998,"value":3134},".height\n",{"type":993,"tag":1026,"props":3136,"children":3137},{"class":1028,"line":81},[3138],{"type":993,"tag":1026,"props":3139,"children":3140},{"emptyLinePlaceholder":13},[3141],{"type":998,"value":1205},{"type":993,"tag":1026,"props":3143,"children":3144},{"class":1028,"line":91},[3145],{"type":993,"tag":1026,"props":3146,"children":3147},{"style":1032},[3148],{"type":998,"value":3149},"# Create object and access attributes\n",{"type":993,"tag":1026,"props":3151,"children":3152},{"class":1028,"line":100},[3153,3158,3162,3167,3172,3176,3181],{"type":993,"tag":1026,"props":3154,"children":3155},{"style":1053},[3156],{"type":998,"value":3157},"rect ",{"type":993,"tag":1026,"props":3159,"children":3160},{"style":1041},[3161],{"type":998,"value":1093},{"type":993,"tag":1026,"props":3163,"children":3164},{"style":1053},[3165],{"type":998,"value":3166}," Rectangle(",{"type":993,"tag":1026,"props":3168,"children":3169},{"style":1067},[3170],{"type":998,"value":3171},"5",{"type":993,"tag":1026,"props":3173,"children":3174},{"style":1053},[3175],{"type":998,"value":1240},{"type":993,"tag":1026,"props":3177,"children":3178},{"style":1067},[3179],{"type":998,"value":3180},"3",{"type":993,"tag":1026,"props":3182,"children":3183},{"style":1053},[3184],{"type":998,"value":1250},{"type":993,"tag":1026,"props":3186,"children":3187},{"class":1028,"line":109},[3188],{"type":993,"tag":1026,"props":3189,"children":3190},{"emptyLinePlaceholder":13},[3191],{"type":998,"value":1205},{"type":993,"tag":1026,"props":3193,"children":3194},{"class":1028,"line":118},[3195],{"type":993,"tag":1026,"props":3196,"children":3197},{"style":1032},[3198],{"type":998,"value":3199},"# Read attributes\n",{"type":993,"tag":1026,"props":3201,"children":3202},{"class":1028,"line":127},[3203,3207,3211,3215,3220,3224,3229,3233,3237],{"type":993,"tag":1026,"props":3204,"children":3205},{"style":1067},[3206],{"type":998,"value":1299},{"type":993,"tag":1026,"props":3208,"children":3209},{"style":1053},[3210],{"type":998,"value":1316},{"type":993,"tag":1026,"props":3212,"children":3213},{"style":1041},[3214],{"type":998,"value":1321},{"type":993,"tag":1026,"props":3216,"children":3217},{"style":1160},[3218],{"type":998,"value":3219},"\"Width: ",{"type":993,"tag":1026,"props":3221,"children":3222},{"style":1067},[3223],{"type":998,"value":1331},{"type":993,"tag":1026,"props":3225,"children":3226},{"style":1053},[3227],{"type":998,"value":3228},"rect.width",{"type":993,"tag":1026,"props":3230,"children":3231},{"style":1067},[3232],{"type":998,"value":1178},{"type":993,"tag":1026,"props":3234,"children":3235},{"style":1160},[3236],{"type":998,"value":1345},{"type":993,"tag":1026,"props":3238,"children":3239},{"style":1053},[3240],{"type":998,"value":1250},{"type":993,"tag":1026,"props":3242,"children":3243},{"class":1028,"line":136},[3244,3248,3252,3256,3261,3265,3270,3274,3278],{"type":993,"tag":1026,"props":3245,"children":3246},{"style":1067},[3247],{"type":998,"value":1299},{"type":993,"tag":1026,"props":3249,"children":3250},{"style":1053},[3251],{"type":998,"value":1316},{"type":993,"tag":1026,"props":3253,"children":3254},{"style":1041},[3255],{"type":998,"value":1321},{"type":993,"tag":1026,"props":3257,"children":3258},{"style":1160},[3259],{"type":998,"value":3260},"\"Height: ",{"type":993,"tag":1026,"props":3262,"children":3263},{"style":1067},[3264],{"type":998,"value":1331},{"type":993,"tag":1026,"props":3266,"children":3267},{"style":1053},[3268],{"type":998,"value":3269},"rect.height",{"type":993,"tag":1026,"props":3271,"children":3272},{"style":1067},[3273],{"type":998,"value":1178},{"type":993,"tag":1026,"props":3275,"children":3276},{"style":1160},[3277],{"type":998,"value":1345},{"type":993,"tag":1026,"props":3279,"children":3280},{"style":1053},[3281],{"type":998,"value":1250},{"type":993,"tag":1026,"props":3283,"children":3284},{"class":1028,"line":146},[3285],{"type":993,"tag":1026,"props":3286,"children":3287},{"emptyLinePlaceholder":13},[3288],{"type":998,"value":1205},{"type":993,"tag":1026,"props":3290,"children":3291},{"class":1028,"line":155},[3292],{"type":993,"tag":1026,"props":3293,"children":3294},{"style":1032},[3295],{"type":998,"value":3296},"# Modify attributes\n",{"type":993,"tag":1026,"props":3298,"children":3299},{"class":1028,"line":164},[3300,3305,3309],{"type":993,"tag":1026,"props":3301,"children":3302},{"style":1053},[3303],{"type":998,"value":3304},"rect.width ",{"type":993,"tag":1026,"props":3306,"children":3307},{"style":1041},[3308],{"type":998,"value":1093},{"type":993,"tag":1026,"props":3310,"children":3311},{"style":1067},[3312],{"type":998,"value":3313}," 7\n",{"type":993,"tag":1026,"props":3315,"children":3316},{"class":1028,"line":173},[3317,3321,3325,3329,3334,3338,3342,3346,3350],{"type":993,"tag":1026,"props":3318,"children":3319},{"style":1067},[3320],{"type":998,"value":1299},{"type":993,"tag":1026,"props":3322,"children":3323},{"style":1053},[3324],{"type":998,"value":1316},{"type":993,"tag":1026,"props":3326,"children":3327},{"style":1041},[3328],{"type":998,"value":1321},{"type":993,"tag":1026,"props":3330,"children":3331},{"style":1160},[3332],{"type":998,"value":3333},"\"New width: ",{"type":993,"tag":1026,"props":3335,"children":3336},{"style":1067},[3337],{"type":998,"value":1331},{"type":993,"tag":1026,"props":3339,"children":3340},{"style":1053},[3341],{"type":998,"value":3228},{"type":993,"tag":1026,"props":3343,"children":3344},{"style":1067},[3345],{"type":998,"value":1178},{"type":993,"tag":1026,"props":3347,"children":3348},{"style":1160},[3349],{"type":998,"value":1345},{"type":993,"tag":1026,"props":3351,"children":3352},{"style":1053},[3353],{"type":998,"value":1250},{"type":993,"tag":1026,"props":3355,"children":3356},{"class":1028,"line":182},[3357,3361,3365,3369,3374,3378,3383,3387,3391],{"type":993,"tag":1026,"props":3358,"children":3359},{"style":1067},[3360],{"type":998,"value":1299},{"type":993,"tag":1026,"props":3362,"children":3363},{"style":1053},[3364],{"type":998,"value":1316},{"type":993,"tag":1026,"props":3366,"children":3367},{"style":1041},[3368],{"type":998,"value":1321},{"type":993,"tag":1026,"props":3370,"children":3371},{"style":1160},[3372],{"type":998,"value":3373},"\"New area: ",{"type":993,"tag":1026,"props":3375,"children":3376},{"style":1067},[3377],{"type":998,"value":1331},{"type":993,"tag":1026,"props":3379,"children":3380},{"style":1053},[3381],{"type":998,"value":3382},"rect.area()",{"type":993,"tag":1026,"props":3384,"children":3385},{"style":1067},[3386],{"type":998,"value":1178},{"type":993,"tag":1026,"props":3388,"children":3389},{"style":1160},[3390],{"type":998,"value":1345},{"type":993,"tag":1026,"props":3392,"children":3393},{"style":1053},[3394],{"type":998,"value":1250},{"type":993,"tag":1520,"props":3396,"children":3398},{"id":3397},"method-calls",[3399],{"type":998,"value":3400},"Method Calls",{"type":993,"tag":1001,"props":3402,"children":3403},{},[3404],{"type":998,"value":3405},"Methods are functions that belong to objects and can access the object's attributes. When you call a method, Python automatically passes the object as the first parameter (self).",{"type":993,"tag":1012,"props":3407,"children":3408},{},[3409],{"type":993,"tag":1016,"props":3410,"children":3412},{"className":1018,"code":3411,"language":6,"meta":8,"style":8},"class BankAccount:\n    def __init__(self, owner, initial_balance=0):\n        self.owner = owner\n        self.balance = initial_balance\n    \n    def deposit(self, amount):\n        self.balance += amount\n        return self.balance\n    \n    def withdraw(self, amount):\n        if amount \u003C= self.balance:\n            self.balance -= amount\n            return f\"Withdrew ${amount}. Balance: ${self.balance}\"\n        return \"Insufficient funds\"\n    \n    def check_balance(self):\n        return f\"{self.owner}'s balance: ${self.balance}\"\n\n# Create account and use methods\naccount = BankAccount(\"Alice\", 100)\nprint(account.check_balance())\naccount.deposit(50)\nprint(account.withdraw(30))\nprint(account.check_balance())\n",[3413],{"type":993,"tag":1022,"props":3414,"children":3415},{"__ignoreMap":8},[3416,3432,3462,3483,3504,3511,3528,3548,3564,3571,3587,3613,3634,3685,3697,3704,3720,3769,3776,3784,3818,3830,3847,3869],{"type":993,"tag":1026,"props":3417,"children":3418},{"class":1028,"line":12},[3419,3423,3428],{"type":993,"tag":1026,"props":3420,"children":3421},{"style":1041},[3422],{"type":998,"value":1044},{"type":993,"tag":1026,"props":3424,"children":3425},{"style":1047},[3426],{"type":998,"value":3427}," BankAccount",{"type":993,"tag":1026,"props":3429,"children":3430},{"style":1053},[3431],{"type":998,"value":1056},{"type":993,"tag":1026,"props":3433,"children":3434},{"class":1028,"line":27},[3435,3439,3443,3448,3452,3457],{"type":993,"tag":1026,"props":3436,"children":3437},{"style":1041},[3438],{"type":998,"value":1064},{"type":993,"tag":1026,"props":3440,"children":3441},{"style":1067},[3442],{"type":998,"value":1070},{"type":993,"tag":1026,"props":3444,"children":3445},{"style":1053},[3446],{"type":998,"value":3447},"(self, owner, initial_balance",{"type":993,"tag":1026,"props":3449,"children":3450},{"style":1041},[3451],{"type":998,"value":1093},{"type":993,"tag":1026,"props":3453,"children":3454},{"style":1067},[3455],{"type":998,"value":3456},"0",{"type":993,"tag":1026,"props":3458,"children":3459},{"style":1053},[3460],{"type":998,"value":3461},"):\n",{"type":993,"tag":1026,"props":3463,"children":3464},{"class":1028,"line":36},[3465,3469,3474,3478],{"type":993,"tag":1026,"props":3466,"children":3467},{"style":1067},[3468],{"type":998,"value":1083},{"type":993,"tag":1026,"props":3470,"children":3471},{"style":1053},[3472],{"type":998,"value":3473},".owner ",{"type":993,"tag":1026,"props":3475,"children":3476},{"style":1041},[3477],{"type":998,"value":1093},{"type":993,"tag":1026,"props":3479,"children":3480},{"style":1053},[3481],{"type":998,"value":3482}," owner\n",{"type":993,"tag":1026,"props":3484,"children":3485},{"class":1028,"line":45},[3486,3490,3495,3499],{"type":993,"tag":1026,"props":3487,"children":3488},{"style":1067},[3489],{"type":998,"value":1083},{"type":993,"tag":1026,"props":3491,"children":3492},{"style":1053},[3493],{"type":998,"value":3494},".balance ",{"type":993,"tag":1026,"props":3496,"children":3497},{"style":1041},[3498],{"type":998,"value":1093},{"type":993,"tag":1026,"props":3500,"children":3501},{"style":1053},[3502],{"type":998,"value":3503}," initial_balance\n",{"type":993,"tag":1026,"props":3505,"children":3506},{"class":1028,"line":54},[3507],{"type":993,"tag":1026,"props":3508,"children":3509},{"style":1053},[3510],{"type":998,"value":1127},{"type":993,"tag":1026,"props":3512,"children":3513},{"class":1028,"line":63},[3514,3518,3523],{"type":993,"tag":1026,"props":3515,"children":3516},{"style":1041},[3517],{"type":998,"value":1064},{"type":993,"tag":1026,"props":3519,"children":3520},{"style":1047},[3521],{"type":998,"value":3522}," deposit",{"type":993,"tag":1026,"props":3524,"children":3525},{"style":1053},[3526],{"type":998,"value":3527},"(self, amount):\n",{"type":993,"tag":1026,"props":3529,"children":3530},{"class":1028,"line":72},[3531,3535,3539,3543],{"type":993,"tag":1026,"props":3532,"children":3533},{"style":1067},[3534],{"type":998,"value":1083},{"type":993,"tag":1026,"props":3536,"children":3537},{"style":1053},[3538],{"type":998,"value":3494},{"type":993,"tag":1026,"props":3540,"children":3541},{"style":1041},[3542],{"type":998,"value":1754},{"type":993,"tag":1026,"props":3544,"children":3545},{"style":1053},[3546],{"type":998,"value":3547}," amount\n",{"type":993,"tag":1026,"props":3549,"children":3550},{"class":1028,"line":81},[3551,3555,3559],{"type":993,"tag":1026,"props":3552,"children":3553},{"style":1041},[3554],{"type":998,"value":1152},{"type":993,"tag":1026,"props":3556,"children":3557},{"style":1067},[3558],{"type":998,"value":2661},{"type":993,"tag":1026,"props":3560,"children":3561},{"style":1053},[3562],{"type":998,"value":3563},".balance\n",{"type":993,"tag":1026,"props":3565,"children":3566},{"class":1028,"line":91},[3567],{"type":993,"tag":1026,"props":3568,"children":3569},{"style":1053},[3570],{"type":998,"value":1127},{"type":993,"tag":1026,"props":3572,"children":3573},{"class":1028,"line":100},[3574,3578,3583],{"type":993,"tag":1026,"props":3575,"children":3576},{"style":1041},[3577],{"type":998,"value":1064},{"type":993,"tag":1026,"props":3579,"children":3580},{"style":1047},[3581],{"type":998,"value":3582}," withdraw",{"type":993,"tag":1026,"props":3584,"children":3585},{"style":1053},[3586],{"type":998,"value":3527},{"type":993,"tag":1026,"props":3588,"children":3589},{"class":1028,"line":109},[3590,3594,3599,3604,3608],{"type":993,"tag":1026,"props":3591,"children":3592},{"style":1041},[3593],{"type":998,"value":2656},{"type":993,"tag":1026,"props":3595,"children":3596},{"style":1053},[3597],{"type":998,"value":3598}," amount ",{"type":993,"tag":1026,"props":3600,"children":3601},{"style":1041},[3602],{"type":998,"value":3603},"\u003C=",{"type":993,"tag":1026,"props":3605,"children":3606},{"style":1067},[3607],{"type":998,"value":2661},{"type":993,"tag":1026,"props":3609,"children":3610},{"style":1053},[3611],{"type":998,"value":3612},".balance:\n",{"type":993,"tag":1026,"props":3614,"children":3615},{"class":1028,"line":118},[3616,3621,3625,3630],{"type":993,"tag":1026,"props":3617,"children":3618},{"style":1067},[3619],{"type":998,"value":3620},"            self",{"type":993,"tag":1026,"props":3622,"children":3623},{"style":1053},[3624],{"type":998,"value":3494},{"type":993,"tag":1026,"props":3626,"children":3627},{"style":1041},[3628],{"type":998,"value":3629},"-=",{"type":993,"tag":1026,"props":3631,"children":3632},{"style":1053},[3633],{"type":998,"value":3547},{"type":993,"tag":1026,"props":3635,"children":3636},{"class":1028,"line":127},[3637,3641,3645,3650,3654,3659,3663,3668,3672,3677,3681],{"type":993,"tag":1026,"props":3638,"children":3639},{"style":1041},[3640],{"type":998,"value":2674},{"type":993,"tag":1026,"props":3642,"children":3643},{"style":1041},[3644],{"type":998,"value":1157},{"type":993,"tag":1026,"props":3646,"children":3647},{"style":1160},[3648],{"type":998,"value":3649},"\"Withdrew $",{"type":993,"tag":1026,"props":3651,"children":3652},{"style":1067},[3653],{"type":998,"value":1331},{"type":993,"tag":1026,"props":3655,"children":3656},{"style":1053},[3657],{"type":998,"value":3658},"amount",{"type":993,"tag":1026,"props":3660,"children":3661},{"style":1067},[3662],{"type":998,"value":1178},{"type":993,"tag":1026,"props":3664,"children":3665},{"style":1160},[3666],{"type":998,"value":3667},". Balance: $",{"type":993,"tag":1026,"props":3669,"children":3670},{"style":1067},[3671],{"type":998,"value":1168},{"type":993,"tag":1026,"props":3673,"children":3674},{"style":1053},[3675],{"type":998,"value":3676},".balance",{"type":993,"tag":1026,"props":3678,"children":3679},{"style":1067},[3680],{"type":998,"value":1178},{"type":993,"tag":1026,"props":3682,"children":3683},{"style":1160},[3684],{"type":998,"value":1809},{"type":993,"tag":1026,"props":3686,"children":3687},{"class":1028,"line":136},[3688,3692],{"type":993,"tag":1026,"props":3689,"children":3690},{"style":1041},[3691],{"type":998,"value":1152},{"type":993,"tag":1026,"props":3693,"children":3694},{"style":1160},[3695],{"type":998,"value":3696}," \"Insufficient funds\"\n",{"type":993,"tag":1026,"props":3698,"children":3699},{"class":1028,"line":146},[3700],{"type":993,"tag":1026,"props":3701,"children":3702},{"style":1053},[3703],{"type":998,"value":1127},{"type":993,"tag":1026,"props":3705,"children":3706},{"class":1028,"line":155},[3707,3711,3716],{"type":993,"tag":1026,"props":3708,"children":3709},{"style":1041},[3710],{"type":998,"value":1064},{"type":993,"tag":1026,"props":3712,"children":3713},{"style":1047},[3714],{"type":998,"value":3715}," check_balance",{"type":993,"tag":1026,"props":3717,"children":3718},{"style":1053},[3719],{"type":998,"value":1144},{"type":993,"tag":1026,"props":3721,"children":3722},{"class":1028,"line":164},[3723,3727,3731,3735,3739,3744,3748,3753,3757,3761,3765],{"type":993,"tag":1026,"props":3724,"children":3725},{"style":1041},[3726],{"type":998,"value":1152},{"type":993,"tag":1026,"props":3728,"children":3729},{"style":1041},[3730],{"type":998,"value":1157},{"type":993,"tag":1026,"props":3732,"children":3733},{"style":1160},[3734],{"type":998,"value":1345},{"type":993,"tag":1026,"props":3736,"children":3737},{"style":1067},[3738],{"type":998,"value":1168},{"type":993,"tag":1026,"props":3740,"children":3741},{"style":1053},[3742],{"type":998,"value":3743},".owner",{"type":993,"tag":1026,"props":3745,"children":3746},{"style":1067},[3747],{"type":998,"value":1178},{"type":993,"tag":1026,"props":3749,"children":3750},{"style":1160},[3751],{"type":998,"value":3752},"'s balance: $",{"type":993,"tag":1026,"props":3754,"children":3755},{"style":1067},[3756],{"type":998,"value":1168},{"type":993,"tag":1026,"props":3758,"children":3759},{"style":1053},[3760],{"type":998,"value":3676},{"type":993,"tag":1026,"props":3762,"children":3763},{"style":1067},[3764],{"type":998,"value":1178},{"type":993,"tag":1026,"props":3766,"children":3767},{"style":1160},[3768],{"type":998,"value":1809},{"type":993,"tag":1026,"props":3770,"children":3771},{"class":1028,"line":173},[3772],{"type":993,"tag":1026,"props":3773,"children":3774},{"emptyLinePlaceholder":13},[3775],{"type":998,"value":1205},{"type":993,"tag":1026,"props":3777,"children":3778},{"class":1028,"line":182},[3779],{"type":993,"tag":1026,"props":3780,"children":3781},{"style":1032},[3782],{"type":998,"value":3783},"# Create account and use methods\n",{"type":993,"tag":1026,"props":3785,"children":3786},{"class":1028,"line":191},[3787,3792,3796,3801,3805,3809,3814],{"type":993,"tag":1026,"props":3788,"children":3789},{"style":1053},[3790],{"type":998,"value":3791},"account ",{"type":993,"tag":1026,"props":3793,"children":3794},{"style":1041},[3795],{"type":998,"value":1093},{"type":993,"tag":1026,"props":3797,"children":3798},{"style":1053},[3799],{"type":998,"value":3800}," BankAccount(",{"type":993,"tag":1026,"props":3802,"children":3803},{"style":1160},[3804],{"type":998,"value":2765},{"type":993,"tag":1026,"props":3806,"children":3807},{"style":1053},[3808],{"type":998,"value":1240},{"type":993,"tag":1026,"props":3810,"children":3811},{"style":1067},[3812],{"type":998,"value":3813},"100",{"type":993,"tag":1026,"props":3815,"children":3816},{"style":1053},[3817],{"type":998,"value":1250},{"type":993,"tag":1026,"props":3819,"children":3820},{"class":1028,"line":201},[3821,3825],{"type":993,"tag":1026,"props":3822,"children":3823},{"style":1067},[3824],{"type":998,"value":1299},{"type":993,"tag":1026,"props":3826,"children":3827},{"style":1053},[3828],{"type":998,"value":3829},"(account.check_balance())\n",{"type":993,"tag":1026,"props":3831,"children":3832},{"class":1028,"line":210},[3833,3838,3843],{"type":993,"tag":1026,"props":3834,"children":3835},{"style":1053},[3836],{"type":998,"value":3837},"account.deposit(",{"type":993,"tag":1026,"props":3839,"children":3840},{"style":1067},[3841],{"type":998,"value":3842},"50",{"type":993,"tag":1026,"props":3844,"children":3845},{"style":1053},[3846],{"type":998,"value":1250},{"type":993,"tag":1026,"props":3848,"children":3849},{"class":1028,"line":219},[3850,3854,3859,3864],{"type":993,"tag":1026,"props":3851,"children":3852},{"style":1067},[3853],{"type":998,"value":1299},{"type":993,"tag":1026,"props":3855,"children":3856},{"style":1053},[3857],{"type":998,"value":3858},"(account.withdraw(",{"type":993,"tag":1026,"props":3860,"children":3861},{"style":1067},[3862],{"type":998,"value":3863},"30",{"type":993,"tag":1026,"props":3865,"children":3866},{"style":1053},[3867],{"type":998,"value":3868},"))\n",{"type":993,"tag":1026,"props":3870,"children":3871},{"class":1028,"line":228},[3872,3876],{"type":993,"tag":1026,"props":3873,"children":3874},{"style":1067},[3875],{"type":998,"value":1299},{"type":993,"tag":1026,"props":3877,"children":3878},{"style":1053},[3879],{"type":998,"value":3829},{"type":993,"tag":1392,"props":3881,"children":3883},{"id":3882},"class-vs-object-comparison",[3884],{"type":998,"value":3885},"📊 Class vs Object Comparison",{"type":993,"tag":1001,"props":3887,"children":3888},{},[3889],{"type":998,"value":3890},"Understanding the distinction between classes and objects helps clarify their roles in object-oriented programming.",{"type":993,"tag":3892,"props":3893,"children":3894},"table",{},[3895,3919],{"type":993,"tag":3896,"props":3897,"children":3898},"thead",{},[3899],{"type":993,"tag":3900,"props":3901,"children":3902},"tr",{},[3903,3909,3914],{"type":993,"tag":3904,"props":3905,"children":3906},"th",{},[3907],{"type":998,"value":3908},"Aspect",{"type":993,"tag":3904,"props":3910,"children":3911},{},[3912],{"type":998,"value":3913},"Class",{"type":993,"tag":3904,"props":3915,"children":3916},{},[3917],{"type":998,"value":3918},"Object",{"type":993,"tag":3920,"props":3921,"children":3922},"tbody",{},[3923,3945,3966,3987,4008,4029],{"type":993,"tag":3900,"props":3924,"children":3925},{},[3926,3935,3940],{"type":993,"tag":3927,"props":3928,"children":3929},"td",{},[3930],{"type":993,"tag":1414,"props":3931,"children":3932},{},[3933],{"type":998,"value":3934},"Definition",{"type":993,"tag":3927,"props":3936,"children":3937},{},[3938],{"type":998,"value":3939},"Blueprint/template",{"type":993,"tag":3927,"props":3941,"children":3942},{},[3943],{"type":998,"value":3944},"Specific instance",{"type":993,"tag":3900,"props":3946,"children":3947},{},[3948,3956,3961],{"type":993,"tag":3927,"props":3949,"children":3950},{},[3951],{"type":993,"tag":1414,"props":3952,"children":3953},{},[3954],{"type":998,"value":3955},"Memory",{"type":993,"tag":3927,"props":3957,"children":3958},{},[3959],{"type":998,"value":3960},"No memory allocated",{"type":993,"tag":3927,"props":3962,"children":3963},{},[3964],{"type":998,"value":3965},"Occupies memory",{"type":993,"tag":3900,"props":3967,"children":3968},{},[3969,3977,3982],{"type":993,"tag":3927,"props":3970,"children":3971},{},[3972],{"type":993,"tag":1414,"props":3973,"children":3974},{},[3975],{"type":998,"value":3976},"Attributes",{"type":993,"tag":3927,"props":3978,"children":3979},{},[3980],{"type":998,"value":3981},"Defines what attributes exist",{"type":993,"tag":3927,"props":3983,"children":3984},{},[3985],{"type":998,"value":3986},"Has actual attribute values",{"type":993,"tag":3900,"props":3988,"children":3989},{},[3990,3998,4003],{"type":993,"tag":3927,"props":3991,"children":3992},{},[3993],{"type":993,"tag":1414,"props":3994,"children":3995},{},[3996],{"type":998,"value":3997},"Methods",{"type":993,"tag":3927,"props":3999,"children":4000},{},[4001],{"type":998,"value":4002},"Defines available methods",{"type":993,"tag":3927,"props":4004,"children":4005},{},[4006],{"type":998,"value":4007},"Can call methods",{"type":993,"tag":3900,"props":4009,"children":4010},{},[4011,4019,4024],{"type":993,"tag":3927,"props":4012,"children":4013},{},[4014],{"type":993,"tag":1414,"props":4015,"children":4016},{},[4017],{"type":998,"value":4018},"Quantity",{"type":993,"tag":3927,"props":4020,"children":4021},{},[4022],{"type":998,"value":4023},"One class definition",{"type":993,"tag":3927,"props":4025,"children":4026},{},[4027],{"type":998,"value":4028},"Many objects possible",{"type":993,"tag":3900,"props":4030,"children":4031},{},[4032,4040,4045],{"type":993,"tag":3927,"props":4033,"children":4034},{},[4035],{"type":993,"tag":1414,"props":4036,"children":4037},{},[4038],{"type":998,"value":4039},"Purpose",{"type":993,"tag":3927,"props":4041,"children":4042},{},[4043],{"type":998,"value":4044},"Template for creating objects",{"type":993,"tag":3927,"props":4046,"children":4047},{},[4048],{"type":998,"value":4049},"Represents specific entity",{"type":993,"tag":1392,"props":4051,"children":4053},{"id":4052},"common-patterns-and-examples",[4054],{"type":998,"value":4055},"🌟 Common Patterns and Examples",{"type":993,"tag":1001,"props":4057,"children":4058},{},[4059],{"type":998,"value":4060},"Classes and objects appear in many programming scenarios, from simple data modeling to complex application architecture.",{"type":993,"tag":1520,"props":4062,"children":4064},{"id":4063},"data-modeling",[4065],{"type":998,"value":4066},"Data Modeling",{"type":993,"tag":1001,"props":4068,"children":4069},{},[4070],{"type":998,"value":4071},"Classes excel at representing real-world entities with their properties and behaviors.",{"type":993,"tag":1012,"props":4073,"children":4074},{},[4075],{"type":993,"tag":1016,"props":4076,"children":4078},{"className":1018,"code":4077,"language":6,"meta":8,"style":8},"class Product:\n    def __init__(self, name, price, stock):\n        self.name = name\n        self.price = price\n        self.stock = stock\n    \n    def sell(self, quantity):\n        if quantity \u003C= self.stock:\n            self.stock -= quantity\n            return f\"Sold {quantity} {self.name}(s). {self.stock} remaining\"\n        return \"Insufficient stock\"\n    \n    def restock(self, quantity):\n        self.stock += quantity\n        return f\"Restocked {quantity} items. New stock: {self.stock}\"\n\n# Model inventory system\nlaptop = Product(\"Laptop\", 999, 5)\nprint(laptop.sell(2))\nprint(laptop.restock(10))\n",[4079],{"type":993,"tag":1022,"props":4080,"children":4081},{"__ignoreMap":8},[4082,4098,4114,4133,4154,4175,4182,4199,4224,4244,4308,4320,4327,4343,4362,4411,4418,4426,4469,4490],{"type":993,"tag":1026,"props":4083,"children":4084},{"class":1028,"line":12},[4085,4089,4094],{"type":993,"tag":1026,"props":4086,"children":4087},{"style":1041},[4088],{"type":998,"value":1044},{"type":993,"tag":1026,"props":4090,"children":4091},{"style":1047},[4092],{"type":998,"value":4093}," Product",{"type":993,"tag":1026,"props":4095,"children":4096},{"style":1053},[4097],{"type":998,"value":1056},{"type":993,"tag":1026,"props":4099,"children":4100},{"class":1028,"line":27},[4101,4105,4109],{"type":993,"tag":1026,"props":4102,"children":4103},{"style":1041},[4104],{"type":998,"value":1064},{"type":993,"tag":1026,"props":4106,"children":4107},{"style":1067},[4108],{"type":998,"value":1070},{"type":993,"tag":1026,"props":4110,"children":4111},{"style":1053},[4112],{"type":998,"value":4113},"(self, name, price, stock):\n",{"type":993,"tag":1026,"props":4115,"children":4116},{"class":1028,"line":36},[4117,4121,4125,4129],{"type":993,"tag":1026,"props":4118,"children":4119},{"style":1067},[4120],{"type":998,"value":1083},{"type":993,"tag":1026,"props":4122,"children":4123},{"style":1053},[4124],{"type":998,"value":1591},{"type":993,"tag":1026,"props":4126,"children":4127},{"style":1041},[4128],{"type":998,"value":1093},{"type":993,"tag":1026,"props":4130,"children":4131},{"style":1053},[4132],{"type":998,"value":2471},{"type":993,"tag":1026,"props":4134,"children":4135},{"class":1028,"line":45},[4136,4140,4145,4149],{"type":993,"tag":1026,"props":4137,"children":4138},{"style":1067},[4139],{"type":998,"value":1083},{"type":993,"tag":1026,"props":4141,"children":4142},{"style":1053},[4143],{"type":998,"value":4144},".price ",{"type":993,"tag":1026,"props":4146,"children":4147},{"style":1041},[4148],{"type":998,"value":1093},{"type":993,"tag":1026,"props":4150,"children":4151},{"style":1053},[4152],{"type":998,"value":4153}," price\n",{"type":993,"tag":1026,"props":4155,"children":4156},{"class":1028,"line":54},[4157,4161,4166,4170],{"type":993,"tag":1026,"props":4158,"children":4159},{"style":1067},[4160],{"type":998,"value":1083},{"type":993,"tag":1026,"props":4162,"children":4163},{"style":1053},[4164],{"type":998,"value":4165},".stock ",{"type":993,"tag":1026,"props":4167,"children":4168},{"style":1041},[4169],{"type":998,"value":1093},{"type":993,"tag":1026,"props":4171,"children":4172},{"style":1053},[4173],{"type":998,"value":4174}," stock\n",{"type":993,"tag":1026,"props":4176,"children":4177},{"class":1028,"line":63},[4178],{"type":993,"tag":1026,"props":4179,"children":4180},{"style":1053},[4181],{"type":998,"value":1127},{"type":993,"tag":1026,"props":4183,"children":4184},{"class":1028,"line":72},[4185,4189,4194],{"type":993,"tag":1026,"props":4186,"children":4187},{"style":1041},[4188],{"type":998,"value":1064},{"type":993,"tag":1026,"props":4190,"children":4191},{"style":1047},[4192],{"type":998,"value":4193}," sell",{"type":993,"tag":1026,"props":4195,"children":4196},{"style":1053},[4197],{"type":998,"value":4198},"(self, quantity):\n",{"type":993,"tag":1026,"props":4200,"children":4201},{"class":1028,"line":81},[4202,4206,4211,4215,4219],{"type":993,"tag":1026,"props":4203,"children":4204},{"style":1041},[4205],{"type":998,"value":2656},{"type":993,"tag":1026,"props":4207,"children":4208},{"style":1053},[4209],{"type":998,"value":4210}," quantity ",{"type":993,"tag":1026,"props":4212,"children":4213},{"style":1041},[4214],{"type":998,"value":3603},{"type":993,"tag":1026,"props":4216,"children":4217},{"style":1067},[4218],{"type":998,"value":2661},{"type":993,"tag":1026,"props":4220,"children":4221},{"style":1053},[4222],{"type":998,"value":4223},".stock:\n",{"type":993,"tag":1026,"props":4225,"children":4226},{"class":1028,"line":91},[4227,4231,4235,4239],{"type":993,"tag":1026,"props":4228,"children":4229},{"style":1067},[4230],{"type":998,"value":3620},{"type":993,"tag":1026,"props":4232,"children":4233},{"style":1053},[4234],{"type":998,"value":4165},{"type":993,"tag":1026,"props":4236,"children":4237},{"style":1041},[4238],{"type":998,"value":3629},{"type":993,"tag":1026,"props":4240,"children":4241},{"style":1053},[4242],{"type":998,"value":4243}," quantity\n",{"type":993,"tag":1026,"props":4245,"children":4246},{"class":1028,"line":100},[4247,4251,4255,4260,4264,4269,4273,4277,4281,4285,4290,4294,4299,4303],{"type":993,"tag":1026,"props":4248,"children":4249},{"style":1041},[4250],{"type":998,"value":2674},{"type":993,"tag":1026,"props":4252,"children":4253},{"style":1041},[4254],{"type":998,"value":1157},{"type":993,"tag":1026,"props":4256,"children":4257},{"style":1160},[4258],{"type":998,"value":4259},"\"Sold ",{"type":993,"tag":1026,"props":4261,"children":4262},{"style":1067},[4263],{"type":998,"value":1331},{"type":993,"tag":1026,"props":4265,"children":4266},{"style":1053},[4267],{"type":998,"value":4268},"quantity",{"type":993,"tag":1026,"props":4270,"children":4271},{"style":1067},[4272],{"type":998,"value":1178},{"type":993,"tag":1026,"props":4274,"children":4275},{"style":1067},[4276],{"type":998,"value":1183},{"type":993,"tag":1026,"props":4278,"children":4279},{"style":1053},[4280],{"type":998,"value":1684},{"type":993,"tag":1026,"props":4282,"children":4283},{"style":1067},[4284],{"type":998,"value":1178},{"type":993,"tag":1026,"props":4286,"children":4287},{"style":1160},[4288],{"type":998,"value":4289},"(s). ",{"type":993,"tag":1026,"props":4291,"children":4292},{"style":1067},[4293],{"type":998,"value":1168},{"type":993,"tag":1026,"props":4295,"children":4296},{"style":1053},[4297],{"type":998,"value":4298},".stock",{"type":993,"tag":1026,"props":4300,"children":4301},{"style":1067},[4302],{"type":998,"value":1178},{"type":993,"tag":1026,"props":4304,"children":4305},{"style":1160},[4306],{"type":998,"value":4307}," remaining\"\n",{"type":993,"tag":1026,"props":4309,"children":4310},{"class":1028,"line":109},[4311,4315],{"type":993,"tag":1026,"props":4312,"children":4313},{"style":1041},[4314],{"type":998,"value":1152},{"type":993,"tag":1026,"props":4316,"children":4317},{"style":1160},[4318],{"type":998,"value":4319}," \"Insufficient stock\"\n",{"type":993,"tag":1026,"props":4321,"children":4322},{"class":1028,"line":118},[4323],{"type":993,"tag":1026,"props":4324,"children":4325},{"style":1053},[4326],{"type":998,"value":1127},{"type":993,"tag":1026,"props":4328,"children":4329},{"class":1028,"line":127},[4330,4334,4339],{"type":993,"tag":1026,"props":4331,"children":4332},{"style":1041},[4333],{"type":998,"value":1064},{"type":993,"tag":1026,"props":4335,"children":4336},{"style":1047},[4337],{"type":998,"value":4338}," restock",{"type":993,"tag":1026,"props":4340,"children":4341},{"style":1053},[4342],{"type":998,"value":4198},{"type":993,"tag":1026,"props":4344,"children":4345},{"class":1028,"line":136},[4346,4350,4354,4358],{"type":993,"tag":1026,"props":4347,"children":4348},{"style":1067},[4349],{"type":998,"value":1083},{"type":993,"tag":1026,"props":4351,"children":4352},{"style":1053},[4353],{"type":998,"value":4165},{"type":993,"tag":1026,"props":4355,"children":4356},{"style":1041},[4357],{"type":998,"value":1754},{"type":993,"tag":1026,"props":4359,"children":4360},{"style":1053},[4361],{"type":998,"value":4243},{"type":993,"tag":1026,"props":4363,"children":4364},{"class":1028,"line":146},[4365,4369,4373,4378,4382,4386,4390,4395,4399,4403,4407],{"type":993,"tag":1026,"props":4366,"children":4367},{"style":1041},[4368],{"type":998,"value":1152},{"type":993,"tag":1026,"props":4370,"children":4371},{"style":1041},[4372],{"type":998,"value":1157},{"type":993,"tag":1026,"props":4374,"children":4375},{"style":1160},[4376],{"type":998,"value":4377},"\"Restocked ",{"type":993,"tag":1026,"props":4379,"children":4380},{"style":1067},[4381],{"type":998,"value":1331},{"type":993,"tag":1026,"props":4383,"children":4384},{"style":1053},[4385],{"type":998,"value":4268},{"type":993,"tag":1026,"props":4387,"children":4388},{"style":1067},[4389],{"type":998,"value":1178},{"type":993,"tag":1026,"props":4391,"children":4392},{"style":1160},[4393],{"type":998,"value":4394}," items. New stock: ",{"type":993,"tag":1026,"props":4396,"children":4397},{"style":1067},[4398],{"type":998,"value":1168},{"type":993,"tag":1026,"props":4400,"children":4401},{"style":1053},[4402],{"type":998,"value":4298},{"type":993,"tag":1026,"props":4404,"children":4405},{"style":1067},[4406],{"type":998,"value":1178},{"type":993,"tag":1026,"props":4408,"children":4409},{"style":1160},[4410],{"type":998,"value":1809},{"type":993,"tag":1026,"props":4412,"children":4413},{"class":1028,"line":155},[4414],{"type":993,"tag":1026,"props":4415,"children":4416},{"emptyLinePlaceholder":13},[4417],{"type":998,"value":1205},{"type":993,"tag":1026,"props":4419,"children":4420},{"class":1028,"line":164},[4421],{"type":993,"tag":1026,"props":4422,"children":4423},{"style":1032},[4424],{"type":998,"value":4425},"# Model inventory system\n",{"type":993,"tag":1026,"props":4427,"children":4428},{"class":1028,"line":173},[4429,4434,4438,4443,4448,4452,4457,4461,4465],{"type":993,"tag":1026,"props":4430,"children":4431},{"style":1053},[4432],{"type":998,"value":4433},"laptop ",{"type":993,"tag":1026,"props":4435,"children":4436},{"style":1041},[4437],{"type":998,"value":1093},{"type":993,"tag":1026,"props":4439,"children":4440},{"style":1053},[4441],{"type":998,"value":4442}," Product(",{"type":993,"tag":1026,"props":4444,"children":4445},{"style":1160},[4446],{"type":998,"value":4447},"\"Laptop\"",{"type":993,"tag":1026,"props":4449,"children":4450},{"style":1053},[4451],{"type":998,"value":1240},{"type":993,"tag":1026,"props":4453,"children":4454},{"style":1067},[4455],{"type":998,"value":4456},"999",{"type":993,"tag":1026,"props":4458,"children":4459},{"style":1053},[4460],{"type":998,"value":1240},{"type":993,"tag":1026,"props":4462,"children":4463},{"style":1067},[4464],{"type":998,"value":3171},{"type":993,"tag":1026,"props":4466,"children":4467},{"style":1053},[4468],{"type":998,"value":1250},{"type":993,"tag":1026,"props":4470,"children":4471},{"class":1028,"line":182},[4472,4476,4481,4486],{"type":993,"tag":1026,"props":4473,"children":4474},{"style":1067},[4475],{"type":998,"value":1299},{"type":993,"tag":1026,"props":4477,"children":4478},{"style":1053},[4479],{"type":998,"value":4480},"(laptop.sell(",{"type":993,"tag":1026,"props":4482,"children":4483},{"style":1067},[4484],{"type":998,"value":4485},"2",{"type":993,"tag":1026,"props":4487,"children":4488},{"style":1053},[4489],{"type":998,"value":3868},{"type":993,"tag":1026,"props":4491,"children":4492},{"class":1028,"line":191},[4493,4497,4502,4507],{"type":993,"tag":1026,"props":4494,"children":4495},{"style":1067},[4496],{"type":998,"value":1299},{"type":993,"tag":1026,"props":4498,"children":4499},{"style":1053},[4500],{"type":998,"value":4501},"(laptop.restock(",{"type":993,"tag":1026,"props":4503,"children":4504},{"style":1067},[4505],{"type":998,"value":4506},"10",{"type":993,"tag":1026,"props":4508,"children":4509},{"style":1053},[4510],{"type":998,"value":3868},{"type":993,"tag":1520,"props":4512,"children":4514},{"id":4513},"game-development",[4515],{"type":998,"value":4516},"Game Development",{"type":993,"tag":1001,"props":4518,"children":4519},{},[4520],{"type":998,"value":4521},"Objects naturally represent game entities with properties and behaviors.",{"type":993,"tag":1012,"props":4523,"children":4524},{},[4525],{"type":993,"tag":1016,"props":4526,"children":4528},{"className":1018,"code":4527,"language":6,"meta":8,"style":8},"class Player:\n    def __init__(self, name, health=100):\n        self.name = name\n        self.health = health\n        self.score = 0\n    \n    def take_damage(self, damage):\n        self.health -= damage\n        if self.health \u003C= 0:\n            self.health = 0\n            return f\"{self.name} has been defeated!\"\n        return f\"{self.name} took {damage} damage. Health: {self.health}\"\n    \n    def heal(self, amount):\n        self.health = min(100, self.health + amount)\n        return f\"{self.name} healed for {amount}. Health: {self.health}\"\n\n# Create game characters\nhero = Player(\"Hero\")\nprint(hero.take_damage(30))\nprint(hero.heal(20))\n",[4529],{"type":993,"tag":1022,"props":4530,"children":4531},{"__ignoreMap":8},[4532,4548,4576,4595,4616,4636,4643,4660,4680,4708,4727,4759,4826,4833,4849,4899,4964,4971,4979,5005,5025],{"type":993,"tag":1026,"props":4533,"children":4534},{"class":1028,"line":12},[4535,4539,4544],{"type":993,"tag":1026,"props":4536,"children":4537},{"style":1041},[4538],{"type":998,"value":1044},{"type":993,"tag":1026,"props":4540,"children":4541},{"style":1047},[4542],{"type":998,"value":4543}," Player",{"type":993,"tag":1026,"props":4545,"children":4546},{"style":1053},[4547],{"type":998,"value":1056},{"type":993,"tag":1026,"props":4549,"children":4550},{"class":1028,"line":27},[4551,4555,4559,4564,4568,4572],{"type":993,"tag":1026,"props":4552,"children":4553},{"style":1041},[4554],{"type":998,"value":1064},{"type":993,"tag":1026,"props":4556,"children":4557},{"style":1067},[4558],{"type":998,"value":1070},{"type":993,"tag":1026,"props":4560,"children":4561},{"style":1053},[4562],{"type":998,"value":4563},"(self, name, health",{"type":993,"tag":1026,"props":4565,"children":4566},{"style":1041},[4567],{"type":998,"value":1093},{"type":993,"tag":1026,"props":4569,"children":4570},{"style":1067},[4571],{"type":998,"value":3813},{"type":993,"tag":1026,"props":4573,"children":4574},{"style":1053},[4575],{"type":998,"value":3461},{"type":993,"tag":1026,"props":4577,"children":4578},{"class":1028,"line":36},[4579,4583,4587,4591],{"type":993,"tag":1026,"props":4580,"children":4581},{"style":1067},[4582],{"type":998,"value":1083},{"type":993,"tag":1026,"props":4584,"children":4585},{"style":1053},[4586],{"type":998,"value":1591},{"type":993,"tag":1026,"props":4588,"children":4589},{"style":1041},[4590],{"type":998,"value":1093},{"type":993,"tag":1026,"props":4592,"children":4593},{"style":1053},[4594],{"type":998,"value":2471},{"type":993,"tag":1026,"props":4596,"children":4597},{"class":1028,"line":45},[4598,4602,4607,4611],{"type":993,"tag":1026,"props":4599,"children":4600},{"style":1067},[4601],{"type":998,"value":1083},{"type":993,"tag":1026,"props":4603,"children":4604},{"style":1053},[4605],{"type":998,"value":4606},".health ",{"type":993,"tag":1026,"props":4608,"children":4609},{"style":1041},[4610],{"type":998,"value":1093},{"type":993,"tag":1026,"props":4612,"children":4613},{"style":1053},[4614],{"type":998,"value":4615}," health\n",{"type":993,"tag":1026,"props":4617,"children":4618},{"class":1028,"line":54},[4619,4623,4628,4632],{"type":993,"tag":1026,"props":4620,"children":4621},{"style":1067},[4622],{"type":998,"value":1083},{"type":993,"tag":1026,"props":4624,"children":4625},{"style":1053},[4626],{"type":998,"value":4627},".score ",{"type":993,"tag":1026,"props":4629,"children":4630},{"style":1041},[4631],{"type":998,"value":1093},{"type":993,"tag":1026,"props":4633,"children":4634},{"style":1067},[4635],{"type":998,"value":2728},{"type":993,"tag":1026,"props":4637,"children":4638},{"class":1028,"line":63},[4639],{"type":993,"tag":1026,"props":4640,"children":4641},{"style":1053},[4642],{"type":998,"value":1127},{"type":993,"tag":1026,"props":4644,"children":4645},{"class":1028,"line":72},[4646,4650,4655],{"type":993,"tag":1026,"props":4647,"children":4648},{"style":1041},[4649],{"type":998,"value":1064},{"type":993,"tag":1026,"props":4651,"children":4652},{"style":1047},[4653],{"type":998,"value":4654}," take_damage",{"type":993,"tag":1026,"props":4656,"children":4657},{"style":1053},[4658],{"type":998,"value":4659},"(self, damage):\n",{"type":993,"tag":1026,"props":4661,"children":4662},{"class":1028,"line":81},[4663,4667,4671,4675],{"type":993,"tag":1026,"props":4664,"children":4665},{"style":1067},[4666],{"type":998,"value":1083},{"type":993,"tag":1026,"props":4668,"children":4669},{"style":1053},[4670],{"type":998,"value":4606},{"type":993,"tag":1026,"props":4672,"children":4673},{"style":1041},[4674],{"type":998,"value":3629},{"type":993,"tag":1026,"props":4676,"children":4677},{"style":1053},[4678],{"type":998,"value":4679}," damage\n",{"type":993,"tag":1026,"props":4681,"children":4682},{"class":1028,"line":91},[4683,4687,4691,4695,4699,4704],{"type":993,"tag":1026,"props":4684,"children":4685},{"style":1041},[4686],{"type":998,"value":2656},{"type":993,"tag":1026,"props":4688,"children":4689},{"style":1067},[4690],{"type":998,"value":2661},{"type":993,"tag":1026,"props":4692,"children":4693},{"style":1053},[4694],{"type":998,"value":4606},{"type":993,"tag":1026,"props":4696,"children":4697},{"style":1041},[4698],{"type":998,"value":3603},{"type":993,"tag":1026,"props":4700,"children":4701},{"style":1067},[4702],{"type":998,"value":4703}," 0",{"type":993,"tag":1026,"props":4705,"children":4706},{"style":1053},[4707],{"type":998,"value":1056},{"type":993,"tag":1026,"props":4709,"children":4710},{"class":1028,"line":100},[4711,4715,4719,4723],{"type":993,"tag":1026,"props":4712,"children":4713},{"style":1067},[4714],{"type":998,"value":3620},{"type":993,"tag":1026,"props":4716,"children":4717},{"style":1053},[4718],{"type":998,"value":4606},{"type":993,"tag":1026,"props":4720,"children":4721},{"style":1041},[4722],{"type":998,"value":1093},{"type":993,"tag":1026,"props":4724,"children":4725},{"style":1067},[4726],{"type":998,"value":2728},{"type":993,"tag":1026,"props":4728,"children":4729},{"class":1028,"line":109},[4730,4734,4738,4742,4746,4750,4754],{"type":993,"tag":1026,"props":4731,"children":4732},{"style":1041},[4733],{"type":998,"value":2674},{"type":993,"tag":1026,"props":4735,"children":4736},{"style":1041},[4737],{"type":998,"value":1157},{"type":993,"tag":1026,"props":4739,"children":4740},{"style":1160},[4741],{"type":998,"value":1345},{"type":993,"tag":1026,"props":4743,"children":4744},{"style":1067},[4745],{"type":998,"value":1168},{"type":993,"tag":1026,"props":4747,"children":4748},{"style":1053},[4749],{"type":998,"value":1684},{"type":993,"tag":1026,"props":4751,"children":4752},{"style":1067},[4753],{"type":998,"value":1178},{"type":993,"tag":1026,"props":4755,"children":4756},{"style":1160},[4757],{"type":998,"value":4758}," has been defeated!\"\n",{"type":993,"tag":1026,"props":4760,"children":4761},{"class":1028,"line":118},[4762,4766,4770,4774,4778,4782,4786,4791,4795,4800,4804,4809,4813,4818,4822],{"type":993,"tag":1026,"props":4763,"children":4764},{"style":1041},[4765],{"type":998,"value":1152},{"type":993,"tag":1026,"props":4767,"children":4768},{"style":1041},[4769],{"type":998,"value":1157},{"type":993,"tag":1026,"props":4771,"children":4772},{"style":1160},[4773],{"type":998,"value":1345},{"type":993,"tag":1026,"props":4775,"children":4776},{"style":1067},[4777],{"type":998,"value":1168},{"type":993,"tag":1026,"props":4779,"children":4780},{"style":1053},[4781],{"type":998,"value":1684},{"type":993,"tag":1026,"props":4783,"children":4784},{"style":1067},[4785],{"type":998,"value":1178},{"type":993,"tag":1026,"props":4787,"children":4788},{"style":1160},[4789],{"type":998,"value":4790}," took ",{"type":993,"tag":1026,"props":4792,"children":4793},{"style":1067},[4794],{"type":998,"value":1331},{"type":993,"tag":1026,"props":4796,"children":4797},{"style":1053},[4798],{"type":998,"value":4799},"damage",{"type":993,"tag":1026,"props":4801,"children":4802},{"style":1067},[4803],{"type":998,"value":1178},{"type":993,"tag":1026,"props":4805,"children":4806},{"style":1160},[4807],{"type":998,"value":4808}," damage. Health: ",{"type":993,"tag":1026,"props":4810,"children":4811},{"style":1067},[4812],{"type":998,"value":1168},{"type":993,"tag":1026,"props":4814,"children":4815},{"style":1053},[4816],{"type":998,"value":4817},".health",{"type":993,"tag":1026,"props":4819,"children":4820},{"style":1067},[4821],{"type":998,"value":1178},{"type":993,"tag":1026,"props":4823,"children":4824},{"style":1160},[4825],{"type":998,"value":1809},{"type":993,"tag":1026,"props":4827,"children":4828},{"class":1028,"line":127},[4829],{"type":993,"tag":1026,"props":4830,"children":4831},{"style":1053},[4832],{"type":998,"value":1127},{"type":993,"tag":1026,"props":4834,"children":4835},{"class":1028,"line":136},[4836,4840,4845],{"type":993,"tag":1026,"props":4837,"children":4838},{"style":1041},[4839],{"type":998,"value":1064},{"type":993,"tag":1026,"props":4841,"children":4842},{"style":1047},[4843],{"type":998,"value":4844}," heal",{"type":993,"tag":1026,"props":4846,"children":4847},{"style":1053},[4848],{"type":998,"value":3527},{"type":993,"tag":1026,"props":4850,"children":4851},{"class":1028,"line":146},[4852,4856,4860,4864,4869,4873,4877,4881,4885,4889,4894],{"type":993,"tag":1026,"props":4853,"children":4854},{"style":1067},[4855],{"type":998,"value":1083},{"type":993,"tag":1026,"props":4857,"children":4858},{"style":1053},[4859],{"type":998,"value":4606},{"type":993,"tag":1026,"props":4861,"children":4862},{"style":1041},[4863],{"type":998,"value":1093},{"type":993,"tag":1026,"props":4865,"children":4866},{"style":1067},[4867],{"type":998,"value":4868}," min",{"type":993,"tag":1026,"props":4870,"children":4871},{"style":1053},[4872],{"type":998,"value":1316},{"type":993,"tag":1026,"props":4874,"children":4875},{"style":1067},[4876],{"type":998,"value":3813},{"type":993,"tag":1026,"props":4878,"children":4879},{"style":1053},[4880],{"type":998,"value":1240},{"type":993,"tag":1026,"props":4882,"children":4883},{"style":1067},[4884],{"type":998,"value":2688},{"type":993,"tag":1026,"props":4886,"children":4887},{"style":1053},[4888],{"type":998,"value":4606},{"type":993,"tag":1026,"props":4890,"children":4891},{"style":1041},[4892],{"type":998,"value":4893},"+",{"type":993,"tag":1026,"props":4895,"children":4896},{"style":1053},[4897],{"type":998,"value":4898}," amount)\n",{"type":993,"tag":1026,"props":4900,"children":4901},{"class":1028,"line":155},[4902,4906,4910,4914,4918,4922,4926,4931,4935,4939,4943,4948,4952,4956,4960],{"type":993,"tag":1026,"props":4903,"children":4904},{"style":1041},[4905],{"type":998,"value":1152},{"type":993,"tag":1026,"props":4907,"children":4908},{"style":1041},[4909],{"type":998,"value":1157},{"type":993,"tag":1026,"props":4911,"children":4912},{"style":1160},[4913],{"type":998,"value":1345},{"type":993,"tag":1026,"props":4915,"children":4916},{"style":1067},[4917],{"type":998,"value":1168},{"type":993,"tag":1026,"props":4919,"children":4920},{"style":1053},[4921],{"type":998,"value":1684},{"type":993,"tag":1026,"props":4923,"children":4924},{"style":1067},[4925],{"type":998,"value":1178},{"type":993,"tag":1026,"props":4927,"children":4928},{"style":1160},[4929],{"type":998,"value":4930}," healed for ",{"type":993,"tag":1026,"props":4932,"children":4933},{"style":1067},[4934],{"type":998,"value":1331},{"type":993,"tag":1026,"props":4936,"children":4937},{"style":1053},[4938],{"type":998,"value":3658},{"type":993,"tag":1026,"props":4940,"children":4941},{"style":1067},[4942],{"type":998,"value":1178},{"type":993,"tag":1026,"props":4944,"children":4945},{"style":1160},[4946],{"type":998,"value":4947},". Health: ",{"type":993,"tag":1026,"props":4949,"children":4950},{"style":1067},[4951],{"type":998,"value":1168},{"type":993,"tag":1026,"props":4953,"children":4954},{"style":1053},[4955],{"type":998,"value":4817},{"type":993,"tag":1026,"props":4957,"children":4958},{"style":1067},[4959],{"type":998,"value":1178},{"type":993,"tag":1026,"props":4961,"children":4962},{"style":1160},[4963],{"type":998,"value":1809},{"type":993,"tag":1026,"props":4965,"children":4966},{"class":1028,"line":164},[4967],{"type":993,"tag":1026,"props":4968,"children":4969},{"emptyLinePlaceholder":13},[4970],{"type":998,"value":1205},{"type":993,"tag":1026,"props":4972,"children":4973},{"class":1028,"line":173},[4974],{"type":993,"tag":1026,"props":4975,"children":4976},{"style":1032},[4977],{"type":998,"value":4978},"# Create game characters\n",{"type":993,"tag":1026,"props":4980,"children":4981},{"class":1028,"line":182},[4982,4987,4991,4996,5001],{"type":993,"tag":1026,"props":4983,"children":4984},{"style":1053},[4985],{"type":998,"value":4986},"hero ",{"type":993,"tag":1026,"props":4988,"children":4989},{"style":1041},[4990],{"type":998,"value":1093},{"type":993,"tag":1026,"props":4992,"children":4993},{"style":1053},[4994],{"type":998,"value":4995}," Player(",{"type":993,"tag":1026,"props":4997,"children":4998},{"style":1160},[4999],{"type":998,"value":5000},"\"Hero\"",{"type":993,"tag":1026,"props":5002,"children":5003},{"style":1053},[5004],{"type":998,"value":1250},{"type":993,"tag":1026,"props":5006,"children":5007},{"class":1028,"line":191},[5008,5012,5017,5021],{"type":993,"tag":1026,"props":5009,"children":5010},{"style":1067},[5011],{"type":998,"value":1299},{"type":993,"tag":1026,"props":5013,"children":5014},{"style":1053},[5015],{"type":998,"value":5016},"(hero.take_damage(",{"type":993,"tag":1026,"props":5018,"children":5019},{"style":1067},[5020],{"type":998,"value":3863},{"type":993,"tag":1026,"props":5022,"children":5023},{"style":1053},[5024],{"type":998,"value":3868},{"type":993,"tag":1026,"props":5026,"children":5027},{"class":1028,"line":201},[5028,5032,5037,5042],{"type":993,"tag":1026,"props":5029,"children":5030},{"style":1067},[5031],{"type":998,"value":1299},{"type":993,"tag":1026,"props":5033,"children":5034},{"style":1053},[5035],{"type":998,"value":5036},"(hero.heal(",{"type":993,"tag":1026,"props":5038,"children":5039},{"style":1067},[5040],{"type":998,"value":5041},"20",{"type":993,"tag":1026,"props":5043,"children":5044},{"style":1053},[5045],{"type":998,"value":3868},{"type":993,"tag":1392,"props":5047,"children":5049},{"id":5048},"best-practices",[5050],{"type":998,"value":5051},"💡 Best Practices",{"type":993,"tag":1404,"props":5053,"children":5057},{"emoji":5054,"title":5055,"type":5056},"📚","Design Guidelines","warning",[5058,5066,5094,5102,5125,5133],{"type":993,"tag":1001,"props":5059,"children":5060},{},[5061],{"type":993,"tag":1414,"props":5062,"children":5063},{},[5064],{"type":998,"value":5065},"Class Design:",{"type":993,"tag":1420,"props":5067,"children":5068},{},[5069,5074,5079,5089],{"type":993,"tag":1424,"props":5070,"children":5071},{},[5072],{"type":998,"value":5073},"Keep classes focused on a single responsibility",{"type":993,"tag":1424,"props":5075,"children":5076},{},[5077],{"type":998,"value":5078},"Use descriptive, meaningful class names",{"type":993,"tag":1424,"props":5080,"children":5081},{},[5082,5084],{"type":998,"value":5083},"Initialize all attributes in ",{"type":993,"tag":1022,"props":5085,"children":5087},{"className":5086},[],[5088],{"type":998,"value":1506},{"type":993,"tag":1424,"props":5090,"children":5091},{},[5092],{"type":998,"value":5093},"Keep methods short and focused",{"type":993,"tag":1001,"props":5095,"children":5096},{},[5097],{"type":993,"tag":1414,"props":5098,"children":5099},{},[5100],{"type":998,"value":5101},"Attribute Management:",{"type":993,"tag":1420,"props":5103,"children":5104},{},[5105,5110,5115,5120],{"type":993,"tag":1424,"props":5106,"children":5107},{},[5108],{"type":998,"value":5109},"Use meaningful attribute names",{"type":993,"tag":1424,"props":5111,"children":5112},{},[5113],{"type":998,"value":5114},"Consider default values for optional attributes",{"type":993,"tag":1424,"props":5116,"children":5117},{},[5118],{"type":998,"value":5119},"Group related attributes logically",{"type":993,"tag":1424,"props":5121,"children":5122},{},[5123],{"type":998,"value":5124},"Document complex attribute relationships",{"type":993,"tag":1001,"props":5126,"children":5127},{},[5128],{"type":993,"tag":1414,"props":5129,"children":5130},{},[5131],{"type":998,"value":5132},"Method Guidelines:",{"type":993,"tag":1420,"props":5134,"children":5135},{},[5136,5141,5146,5151],{"type":993,"tag":1424,"props":5137,"children":5138},{},[5139],{"type":998,"value":5140},"Methods should have clear, single purposes",{"type":993,"tag":1424,"props":5142,"children":5143},{},[5144],{"type":998,"value":5145},"Use descriptive method names (verbs for actions)",{"type":993,"tag":1424,"props":5147,"children":5148},{},[5149],{"type":998,"value":5150},"Return meaningful values when appropriate",{"type":993,"tag":1424,"props":5152,"children":5153},{},[5154],{"type":998,"value":5155},"Handle edge cases gracefully",{"type":993,"tag":1520,"props":5157,"children":5159},{"id":5158},"practical-example",[5160],{"type":998,"value":5161},"Practical Example",{"type":993,"tag":1012,"props":5163,"children":5164},{},[5165],{"type":993,"tag":1016,"props":5166,"children":5168},{"className":1018,"code":5167,"language":6,"meta":8,"style":8},"class Task:\n    def __init__(self, title, description=\"\", priority=\"medium\"):\n        self.title = title\n        self.description = description\n        self.priority = priority\n        self.completed = False\n        self.created_date = \"2024-01-15\"  # Simplified for example\n    \n    def mark_complete(self):\n        self.completed = True\n        return f\"Task '{self.title}' marked as complete\"\n    \n    def update_priority(self, new_priority):\n        valid_priorities = [\"low\", \"medium\", \"high\"]\n        if new_priority in valid_priorities:\n            self.priority = new_priority\n            return f\"Priority updated to {new_priority}\"\n        return \"Invalid priority level\"\n    \n    def get_status(self):\n        status = \"✅ Complete\" if self.completed else \"⏳ Pending\"\n        return f\"{self.title} - {status} (Priority: {self.priority})\"\n\n# Create and manage tasks\ntask1 = Task(\"Learn Python\", \"Study object-oriented programming\", \"high\")\ntask2 = Task(\"Buy groceries\")\n\nprint(task1.get_status())\nprint(task1.mark_complete())\nprint(task1.get_status())\nprint(task2.update_priority(\"low\"))\n",[5169],{"type":993,"tag":1022,"props":5170,"children":5171},{"__ignoreMap":8},[5172,5188,5231,5250,5271,5292,5313,5339,5346,5362,5382,5415,5422,5439,5483,5505,5525,5558,5570,5577,5593,5633,5701,5708,5716,5759,5784,5791,5803,5815,5826],{"type":993,"tag":1026,"props":5173,"children":5174},{"class":1028,"line":12},[5175,5179,5184],{"type":993,"tag":1026,"props":5176,"children":5177},{"style":1041},[5178],{"type":998,"value":1044},{"type":993,"tag":1026,"props":5180,"children":5181},{"style":1047},[5182],{"type":998,"value":5183}," Task",{"type":993,"tag":1026,"props":5185,"children":5186},{"style":1053},[5187],{"type":998,"value":1056},{"type":993,"tag":1026,"props":5189,"children":5190},{"class":1028,"line":27},[5191,5195,5199,5204,5208,5213,5218,5222,5227],{"type":993,"tag":1026,"props":5192,"children":5193},{"style":1041},[5194],{"type":998,"value":1064},{"type":993,"tag":1026,"props":5196,"children":5197},{"style":1067},[5198],{"type":998,"value":1070},{"type":993,"tag":1026,"props":5200,"children":5201},{"style":1053},[5202],{"type":998,"value":5203},"(self, title, description",{"type":993,"tag":1026,"props":5205,"children":5206},{"style":1041},[5207],{"type":998,"value":1093},{"type":993,"tag":1026,"props":5209,"children":5210},{"style":1160},[5211],{"type":998,"value":5212},"\"\"",{"type":993,"tag":1026,"props":5214,"children":5215},{"style":1053},[5216],{"type":998,"value":5217},", priority",{"type":993,"tag":1026,"props":5219,"children":5220},{"style":1041},[5221],{"type":998,"value":1093},{"type":993,"tag":1026,"props":5223,"children":5224},{"style":1160},[5225],{"type":998,"value":5226},"\"medium\"",{"type":993,"tag":1026,"props":5228,"children":5229},{"style":1053},[5230],{"type":998,"value":3461},{"type":993,"tag":1026,"props":5232,"children":5233},{"class":1028,"line":36},[5234,5238,5242,5246],{"type":993,"tag":1026,"props":5235,"children":5236},{"style":1067},[5237],{"type":998,"value":1083},{"type":993,"tag":1026,"props":5239,"children":5240},{"style":1053},[5241],{"type":998,"value":1964},{"type":993,"tag":1026,"props":5243,"children":5244},{"style":1041},[5245],{"type":998,"value":1093},{"type":993,"tag":1026,"props":5247,"children":5248},{"style":1053},[5249],{"type":998,"value":1973},{"type":993,"tag":1026,"props":5251,"children":5252},{"class":1028,"line":45},[5253,5257,5262,5266],{"type":993,"tag":1026,"props":5254,"children":5255},{"style":1067},[5256],{"type":998,"value":1083},{"type":993,"tag":1026,"props":5258,"children":5259},{"style":1053},[5260],{"type":998,"value":5261},".description ",{"type":993,"tag":1026,"props":5263,"children":5264},{"style":1041},[5265],{"type":998,"value":1093},{"type":993,"tag":1026,"props":5267,"children":5268},{"style":1053},[5269],{"type":998,"value":5270}," description\n",{"type":993,"tag":1026,"props":5272,"children":5273},{"class":1028,"line":54},[5274,5278,5283,5287],{"type":993,"tag":1026,"props":5275,"children":5276},{"style":1067},[5277],{"type":998,"value":1083},{"type":993,"tag":1026,"props":5279,"children":5280},{"style":1053},[5281],{"type":998,"value":5282},".priority ",{"type":993,"tag":1026,"props":5284,"children":5285},{"style":1041},[5286],{"type":998,"value":1093},{"type":993,"tag":1026,"props":5288,"children":5289},{"style":1053},[5290],{"type":998,"value":5291}," priority\n",{"type":993,"tag":1026,"props":5293,"children":5294},{"class":1028,"line":63},[5295,5299,5304,5308],{"type":993,"tag":1026,"props":5296,"children":5297},{"style":1067},[5298],{"type":998,"value":1083},{"type":993,"tag":1026,"props":5300,"children":5301},{"style":1053},[5302],{"type":998,"value":5303},".completed ",{"type":993,"tag":1026,"props":5305,"children":5306},{"style":1041},[5307],{"type":998,"value":1093},{"type":993,"tag":1026,"props":5309,"children":5310},{"style":1067},[5311],{"type":998,"value":5312}," False\n",{"type":993,"tag":1026,"props":5314,"children":5315},{"class":1028,"line":72},[5316,5320,5325,5329,5334],{"type":993,"tag":1026,"props":5317,"children":5318},{"style":1067},[5319],{"type":998,"value":1083},{"type":993,"tag":1026,"props":5321,"children":5322},{"style":1053},[5323],{"type":998,"value":5324},".created_date ",{"type":993,"tag":1026,"props":5326,"children":5327},{"style":1041},[5328],{"type":998,"value":1093},{"type":993,"tag":1026,"props":5330,"children":5331},{"style":1160},[5332],{"type":998,"value":5333}," \"2024-01-15\"",{"type":993,"tag":1026,"props":5335,"children":5336},{"style":1032},[5337],{"type":998,"value":5338},"  # Simplified for example\n",{"type":993,"tag":1026,"props":5340,"children":5341},{"class":1028,"line":81},[5342],{"type":993,"tag":1026,"props":5343,"children":5344},{"style":1053},[5345],{"type":998,"value":1127},{"type":993,"tag":1026,"props":5347,"children":5348},{"class":1028,"line":91},[5349,5353,5358],{"type":993,"tag":1026,"props":5350,"children":5351},{"style":1041},[5352],{"type":998,"value":1064},{"type":993,"tag":1026,"props":5354,"children":5355},{"style":1047},[5356],{"type":998,"value":5357}," mark_complete",{"type":993,"tag":1026,"props":5359,"children":5360},{"style":1053},[5361],{"type":998,"value":1144},{"type":993,"tag":1026,"props":5363,"children":5364},{"class":1028,"line":100},[5365,5369,5373,5377],{"type":993,"tag":1026,"props":5366,"children":5367},{"style":1067},[5368],{"type":998,"value":1083},{"type":993,"tag":1026,"props":5370,"children":5371},{"style":1053},[5372],{"type":998,"value":5303},{"type":993,"tag":1026,"props":5374,"children":5375},{"style":1041},[5376],{"type":998,"value":1093},{"type":993,"tag":1026,"props":5378,"children":5379},{"style":1067},[5380],{"type":998,"value":5381}," True\n",{"type":993,"tag":1026,"props":5383,"children":5384},{"class":1028,"line":109},[5385,5389,5393,5398,5402,5406,5410],{"type":993,"tag":1026,"props":5386,"children":5387},{"style":1041},[5388],{"type":998,"value":1152},{"type":993,"tag":1026,"props":5390,"children":5391},{"style":1041},[5392],{"type":998,"value":1157},{"type":993,"tag":1026,"props":5394,"children":5395},{"style":1160},[5396],{"type":998,"value":5397},"\"Task '",{"type":993,"tag":1026,"props":5399,"children":5400},{"style":1067},[5401],{"type":998,"value":1168},{"type":993,"tag":1026,"props":5403,"children":5404},{"style":1053},[5405],{"type":998,"value":2089},{"type":993,"tag":1026,"props":5407,"children":5408},{"style":1067},[5409],{"type":998,"value":1178},{"type":993,"tag":1026,"props":5411,"children":5412},{"style":1160},[5413],{"type":998,"value":5414},"' marked as complete\"\n",{"type":993,"tag":1026,"props":5416,"children":5417},{"class":1028,"line":118},[5418],{"type":993,"tag":1026,"props":5419,"children":5420},{"style":1053},[5421],{"type":998,"value":1127},{"type":993,"tag":1026,"props":5423,"children":5424},{"class":1028,"line":127},[5425,5429,5434],{"type":993,"tag":1026,"props":5426,"children":5427},{"style":1041},[5428],{"type":998,"value":1064},{"type":993,"tag":1026,"props":5430,"children":5431},{"style":1047},[5432],{"type":998,"value":5433}," update_priority",{"type":993,"tag":1026,"props":5435,"children":5436},{"style":1053},[5437],{"type":998,"value":5438},"(self, new_priority):\n",{"type":993,"tag":1026,"props":5440,"children":5441},{"class":1028,"line":136},[5442,5447,5451,5456,5461,5465,5469,5473,5478],{"type":993,"tag":1026,"props":5443,"children":5444},{"style":1053},[5445],{"type":998,"value":5446},"        valid_priorities ",{"type":993,"tag":1026,"props":5448,"children":5449},{"style":1041},[5450],{"type":998,"value":1093},{"type":993,"tag":1026,"props":5452,"children":5453},{"style":1053},[5454],{"type":998,"value":5455}," [",{"type":993,"tag":1026,"props":5457,"children":5458},{"style":1160},[5459],{"type":998,"value":5460},"\"low\"",{"type":993,"tag":1026,"props":5462,"children":5463},{"style":1053},[5464],{"type":998,"value":1240},{"type":993,"tag":1026,"props":5466,"children":5467},{"style":1160},[5468],{"type":998,"value":5226},{"type":993,"tag":1026,"props":5470,"children":5471},{"style":1053},[5472],{"type":998,"value":1240},{"type":993,"tag":1026,"props":5474,"children":5475},{"style":1160},[5476],{"type":998,"value":5477},"\"high\"",{"type":993,"tag":1026,"props":5479,"children":5480},{"style":1053},[5481],{"type":998,"value":5482},"]\n",{"type":993,"tag":1026,"props":5484,"children":5485},{"class":1028,"line":146},[5486,5490,5495,5500],{"type":993,"tag":1026,"props":5487,"children":5488},{"style":1041},[5489],{"type":998,"value":2656},{"type":993,"tag":1026,"props":5491,"children":5492},{"style":1053},[5493],{"type":998,"value":5494}," new_priority ",{"type":993,"tag":1026,"props":5496,"children":5497},{"style":1041},[5498],{"type":998,"value":5499},"in",{"type":993,"tag":1026,"props":5501,"children":5502},{"style":1053},[5503],{"type":998,"value":5504}," valid_priorities:\n",{"type":993,"tag":1026,"props":5506,"children":5507},{"class":1028,"line":155},[5508,5512,5516,5520],{"type":993,"tag":1026,"props":5509,"children":5510},{"style":1067},[5511],{"type":998,"value":3620},{"type":993,"tag":1026,"props":5513,"children":5514},{"style":1053},[5515],{"type":998,"value":5282},{"type":993,"tag":1026,"props":5517,"children":5518},{"style":1041},[5519],{"type":998,"value":1093},{"type":993,"tag":1026,"props":5521,"children":5522},{"style":1053},[5523],{"type":998,"value":5524}," new_priority\n",{"type":993,"tag":1026,"props":5526,"children":5527},{"class":1028,"line":164},[5528,5532,5536,5541,5545,5550,5554],{"type":993,"tag":1026,"props":5529,"children":5530},{"style":1041},[5531],{"type":998,"value":2674},{"type":993,"tag":1026,"props":5533,"children":5534},{"style":1041},[5535],{"type":998,"value":1157},{"type":993,"tag":1026,"props":5537,"children":5538},{"style":1160},[5539],{"type":998,"value":5540},"\"Priority updated to ",{"type":993,"tag":1026,"props":5542,"children":5543},{"style":1067},[5544],{"type":998,"value":1331},{"type":993,"tag":1026,"props":5546,"children":5547},{"style":1053},[5548],{"type":998,"value":5549},"new_priority",{"type":993,"tag":1026,"props":5551,"children":5552},{"style":1067},[5553],{"type":998,"value":1178},{"type":993,"tag":1026,"props":5555,"children":5556},{"style":1160},[5557],{"type":998,"value":1809},{"type":993,"tag":1026,"props":5559,"children":5560},{"class":1028,"line":173},[5561,5565],{"type":993,"tag":1026,"props":5562,"children":5563},{"style":1041},[5564],{"type":998,"value":1152},{"type":993,"tag":1026,"props":5566,"children":5567},{"style":1160},[5568],{"type":998,"value":5569}," \"Invalid priority level\"\n",{"type":993,"tag":1026,"props":5571,"children":5572},{"class":1028,"line":182},[5573],{"type":993,"tag":1026,"props":5574,"children":5575},{"style":1053},[5576],{"type":998,"value":1127},{"type":993,"tag":1026,"props":5578,"children":5579},{"class":1028,"line":191},[5580,5584,5589],{"type":993,"tag":1026,"props":5581,"children":5582},{"style":1041},[5583],{"type":998,"value":1064},{"type":993,"tag":1026,"props":5585,"children":5586},{"style":1047},[5587],{"type":998,"value":5588}," get_status",{"type":993,"tag":1026,"props":5590,"children":5591},{"style":1053},[5592],{"type":998,"value":1144},{"type":993,"tag":1026,"props":5594,"children":5595},{"class":1028,"line":201},[5596,5601,5605,5610,5615,5619,5623,5628],{"type":993,"tag":1026,"props":5597,"children":5598},{"style":1053},[5599],{"type":998,"value":5600},"        status ",{"type":993,"tag":1026,"props":5602,"children":5603},{"style":1041},[5604],{"type":998,"value":1093},{"type":993,"tag":1026,"props":5606,"children":5607},{"style":1160},[5608],{"type":998,"value":5609}," \"✅ Complete\"",{"type":993,"tag":1026,"props":5611,"children":5612},{"style":1041},[5613],{"type":998,"value":5614}," if",{"type":993,"tag":1026,"props":5616,"children":5617},{"style":1067},[5618],{"type":998,"value":2661},{"type":993,"tag":1026,"props":5620,"children":5621},{"style":1053},[5622],{"type":998,"value":5303},{"type":993,"tag":1026,"props":5624,"children":5625},{"style":1041},[5626],{"type":998,"value":5627},"else",{"type":993,"tag":1026,"props":5629,"children":5630},{"style":1160},[5631],{"type":998,"value":5632}," \"⏳ Pending\"\n",{"type":993,"tag":1026,"props":5634,"children":5635},{"class":1028,"line":210},[5636,5640,5644,5648,5652,5656,5660,5665,5669,5674,5678,5683,5687,5692,5696],{"type":993,"tag":1026,"props":5637,"children":5638},{"style":1041},[5639],{"type":998,"value":1152},{"type":993,"tag":1026,"props":5641,"children":5642},{"style":1041},[5643],{"type":998,"value":1157},{"type":993,"tag":1026,"props":5645,"children":5646},{"style":1160},[5647],{"type":998,"value":1345},{"type":993,"tag":1026,"props":5649,"children":5650},{"style":1067},[5651],{"type":998,"value":1168},{"type":993,"tag":1026,"props":5653,"children":5654},{"style":1053},[5655],{"type":998,"value":2089},{"type":993,"tag":1026,"props":5657,"children":5658},{"style":1067},[5659],{"type":998,"value":1178},{"type":993,"tag":1026,"props":5661,"children":5662},{"style":1160},[5663],{"type":998,"value":5664}," - ",{"type":993,"tag":1026,"props":5666,"children":5667},{"style":1067},[5668],{"type":998,"value":1331},{"type":993,"tag":1026,"props":5670,"children":5671},{"style":1053},[5672],{"type":998,"value":5673},"status",{"type":993,"tag":1026,"props":5675,"children":5676},{"style":1067},[5677],{"type":998,"value":1178},{"type":993,"tag":1026,"props":5679,"children":5680},{"style":1160},[5681],{"type":998,"value":5682}," (Priority: ",{"type":993,"tag":1026,"props":5684,"children":5685},{"style":1067},[5686],{"type":998,"value":1168},{"type":993,"tag":1026,"props":5688,"children":5689},{"style":1053},[5690],{"type":998,"value":5691},".priority",{"type":993,"tag":1026,"props":5693,"children":5694},{"style":1067},[5695],{"type":998,"value":1178},{"type":993,"tag":1026,"props":5697,"children":5698},{"style":1160},[5699],{"type":998,"value":5700},")\"\n",{"type":993,"tag":1026,"props":5702,"children":5703},{"class":1028,"line":219},[5704],{"type":993,"tag":1026,"props":5705,"children":5706},{"emptyLinePlaceholder":13},[5707],{"type":998,"value":1205},{"type":993,"tag":1026,"props":5709,"children":5710},{"class":1028,"line":228},[5711],{"type":993,"tag":1026,"props":5712,"children":5713},{"style":1032},[5714],{"type":998,"value":5715},"# Create and manage tasks\n",{"type":993,"tag":1026,"props":5717,"children":5718},{"class":1028,"line":238},[5719,5724,5728,5733,5738,5742,5747,5751,5755],{"type":993,"tag":1026,"props":5720,"children":5721},{"style":1053},[5722],{"type":998,"value":5723},"task1 ",{"type":993,"tag":1026,"props":5725,"children":5726},{"style":1041},[5727],{"type":998,"value":1093},{"type":993,"tag":1026,"props":5729,"children":5730},{"style":1053},[5731],{"type":998,"value":5732}," Task(",{"type":993,"tag":1026,"props":5734,"children":5735},{"style":1160},[5736],{"type":998,"value":5737},"\"Learn Python\"",{"type":993,"tag":1026,"props":5739,"children":5740},{"style":1053},[5741],{"type":998,"value":1240},{"type":993,"tag":1026,"props":5743,"children":5744},{"style":1160},[5745],{"type":998,"value":5746},"\"Study object-oriented programming\"",{"type":993,"tag":1026,"props":5748,"children":5749},{"style":1053},[5750],{"type":998,"value":1240},{"type":993,"tag":1026,"props":5752,"children":5753},{"style":1160},[5754],{"type":998,"value":5477},{"type":993,"tag":1026,"props":5756,"children":5757},{"style":1053},[5758],{"type":998,"value":1250},{"type":993,"tag":1026,"props":5760,"children":5761},{"class":1028,"line":247},[5762,5767,5771,5775,5780],{"type":993,"tag":1026,"props":5763,"children":5764},{"style":1053},[5765],{"type":998,"value":5766},"task2 ",{"type":993,"tag":1026,"props":5768,"children":5769},{"style":1041},[5770],{"type":998,"value":1093},{"type":993,"tag":1026,"props":5772,"children":5773},{"style":1053},[5774],{"type":998,"value":5732},{"type":993,"tag":1026,"props":5776,"children":5777},{"style":1160},[5778],{"type":998,"value":5779},"\"Buy groceries\"",{"type":993,"tag":1026,"props":5781,"children":5782},{"style":1053},[5783],{"type":998,"value":1250},{"type":993,"tag":1026,"props":5785,"children":5786},{"class":1028,"line":256},[5787],{"type":993,"tag":1026,"props":5788,"children":5789},{"emptyLinePlaceholder":13},[5790],{"type":998,"value":1205},{"type":993,"tag":1026,"props":5792,"children":5793},{"class":1028,"line":265},[5794,5798],{"type":993,"tag":1026,"props":5795,"children":5796},{"style":1067},[5797],{"type":998,"value":1299},{"type":993,"tag":1026,"props":5799,"children":5800},{"style":1053},[5801],{"type":998,"value":5802},"(task1.get_status())\n",{"type":993,"tag":1026,"props":5804,"children":5805},{"class":1028,"line":274},[5806,5810],{"type":993,"tag":1026,"props":5807,"children":5808},{"style":1067},[5809],{"type":998,"value":1299},{"type":993,"tag":1026,"props":5811,"children":5812},{"style":1053},[5813],{"type":998,"value":5814},"(task1.mark_complete())\n",{"type":993,"tag":1026,"props":5816,"children":5817},{"class":1028,"line":284},[5818,5822],{"type":993,"tag":1026,"props":5819,"children":5820},{"style":1067},[5821],{"type":998,"value":1299},{"type":993,"tag":1026,"props":5823,"children":5824},{"style":1053},[5825],{"type":998,"value":5802},{"type":993,"tag":1026,"props":5827,"children":5828},{"class":1028,"line":293},[5829,5833,5838,5842],{"type":993,"tag":1026,"props":5830,"children":5831},{"style":1067},[5832],{"type":998,"value":1299},{"type":993,"tag":1026,"props":5834,"children":5835},{"style":1053},[5836],{"type":998,"value":5837},"(task2.update_priority(",{"type":993,"tag":1026,"props":5839,"children":5840},{"style":1160},[5841],{"type":998,"value":5460},{"type":993,"tag":1026,"props":5843,"children":5844},{"style":1053},[5845],{"type":998,"value":3868},{"type":993,"tag":1404,"props":5847,"children":5850},{"emoji":5848,"title":5849,"type":2312},"✅","Key Takeaways",[5851,5861,5871,5888,5898],{"type":993,"tag":1001,"props":5852,"children":5853},{},[5854,5859],{"type":993,"tag":1414,"props":5855,"children":5856},{},[5857],{"type":998,"value":5858},"Classes are Blueprints:",{"type":998,"value":5860}," They define structure but don't store data until objects are created.",{"type":993,"tag":1001,"props":5862,"children":5863},{},[5864,5869],{"type":993,"tag":1414,"props":5865,"children":5866},{},[5867],{"type":998,"value":5868},"Objects are Instances:",{"type":998,"value":5870}," Each object has its own copy of attributes and can call methods.",{"type":993,"tag":1001,"props":5872,"children":5873},{},[5874,5879,5881,5886],{"type":993,"tag":1414,"props":5875,"children":5876},{},[5877],{"type":998,"value":5878},"Initialization Matters:",{"type":998,"value":5880}," The ",{"type":993,"tag":1022,"props":5882,"children":5884},{"className":5883},[],[5885],{"type":998,"value":1506},{"type":998,"value":5887}," method sets up objects with their starting state.",{"type":993,"tag":1001,"props":5889,"children":5890},{},[5891,5896],{"type":993,"tag":1414,"props":5892,"children":5893},{},[5894],{"type":998,"value":5895},"Encapsulation Works:",{"type":998,"value":5897}," Keeping related data and methods together improves code organization.",{"type":993,"tag":1001,"props":5899,"children":5900},{},[5901,5906],{"type":993,"tag":1414,"props":5902,"children":5903},{},[5904],{"type":998,"value":5905},"Practice Builds Understanding:",{"type":998,"value":5907}," Try creating classes for real-world entities you interact with daily.",{"type":993,"tag":5909,"props":5910,"children":5912},"content-exercise",{":widget-view":5911,"category":6,"id":684},"true",[],{"type":993,"tag":5914,"props":5915,"children":5918},"exercise",{"hint":5916,"prompt":5917},"Use __init__ to set up name and age attributes, create simple methods that print messages or modify attributes","Create a simple Dog class with attributes for name and age. Add a method to make the dog bark and another method to celebrate the dog's birthday (increase age by 1). Create a dog object and test the methods.",[5919],{"type":993,"tag":1016,"props":5920,"children":5922},{"className":1018,"code":5921,"language":6,"meta":8,"style":8},"class Dog:\n    def __init__(self, name, age):\n        # TODO: Set the name and age attributes\n        pass\n    \n    def bark(self):\n        # TODO: Make the dog bark (print a message)\n        pass\n    \n    def birthday(self):\n        # TODO: Increase the dog's age by 1\n        pass\n\n# TODO: Create a dog object\nmy_dog = Dog(\"Buddy\", 3)\n\n# TODO: Test your methods\nprint(f\"My dog's name is {my_dog.name} and he is {my_dog.age} years old\")\nmy_dog.bark()\nmy_dog.birthday()\nprint(f\"After birthday: {my_dog.name} is now {my_dog.age} years old\")\n",[5923],{"type":993,"tag":1022,"props":5924,"children":5925},{"__ignoreMap":8},[5926,5942,5957,5975,5983,5990,6006,6022,6029,6036,6052,6068,6075,6082,6099,6133,6140,6156,6216,6224,6232],{"type":993,"tag":1026,"props":5927,"children":5928},{"class":1028,"line":12},[5929,5933,5938],{"type":993,"tag":1026,"props":5930,"children":5931},{"style":1041},[5932],{"type":998,"value":1044},{"type":993,"tag":1026,"props":5934,"children":5935},{"style":1047},[5936],{"type":998,"value":5937}," Dog",{"type":993,"tag":1026,"props":5939,"children":5940},{"style":1053},[5941],{"type":998,"value":1056},{"type":993,"tag":1026,"props":5943,"children":5944},{"class":1028,"line":27},[5945,5949,5953],{"type":993,"tag":1026,"props":5946,"children":5947},{"style":1041},[5948],{"type":998,"value":1064},{"type":993,"tag":1026,"props":5950,"children":5951},{"style":1067},[5952],{"type":998,"value":1070},{"type":993,"tag":1026,"props":5954,"children":5955},{"style":1053},[5956],{"type":998,"value":1579},{"type":993,"tag":1026,"props":5958,"children":5959},{"class":1028,"line":36},[5960,5965,5970],{"type":993,"tag":1026,"props":5961,"children":5962},{"style":1032},[5963],{"type":998,"value":5964},"        # ",{"type":993,"tag":1026,"props":5966,"children":5967},{"style":1041},[5968],{"type":998,"value":5969},"TODO",{"type":993,"tag":1026,"props":5971,"children":5972},{"style":1032},[5973],{"type":998,"value":5974},": Set the name and age attributes\n",{"type":993,"tag":1026,"props":5976,"children":5977},{"class":1028,"line":45},[5978],{"type":993,"tag":1026,"props":5979,"children":5980},{"style":1041},[5981],{"type":998,"value":5982},"        pass\n",{"type":993,"tag":1026,"props":5984,"children":5985},{"class":1028,"line":54},[5986],{"type":993,"tag":1026,"props":5987,"children":5988},{"style":1053},[5989],{"type":998,"value":1127},{"type":993,"tag":1026,"props":5991,"children":5992},{"class":1028,"line":63},[5993,5997,6002],{"type":993,"tag":1026,"props":5994,"children":5995},{"style":1041},[5996],{"type":998,"value":1064},{"type":993,"tag":1026,"props":5998,"children":5999},{"style":1047},[6000],{"type":998,"value":6001}," bark",{"type":993,"tag":1026,"props":6003,"children":6004},{"style":1053},[6005],{"type":998,"value":1144},{"type":993,"tag":1026,"props":6007,"children":6008},{"class":1028,"line":72},[6009,6013,6017],{"type":993,"tag":1026,"props":6010,"children":6011},{"style":1032},[6012],{"type":998,"value":5964},{"type":993,"tag":1026,"props":6014,"children":6015},{"style":1041},[6016],{"type":998,"value":5969},{"type":993,"tag":1026,"props":6018,"children":6019},{"style":1032},[6020],{"type":998,"value":6021},": Make the dog bark (print a message)\n",{"type":993,"tag":1026,"props":6023,"children":6024},{"class":1028,"line":81},[6025],{"type":993,"tag":1026,"props":6026,"children":6027},{"style":1041},[6028],{"type":998,"value":5982},{"type":993,"tag":1026,"props":6030,"children":6031},{"class":1028,"line":91},[6032],{"type":993,"tag":1026,"props":6033,"children":6034},{"style":1053},[6035],{"type":998,"value":1127},{"type":993,"tag":1026,"props":6037,"children":6038},{"class":1028,"line":100},[6039,6043,6048],{"type":993,"tag":1026,"props":6040,"children":6041},{"style":1041},[6042],{"type":998,"value":1064},{"type":993,"tag":1026,"props":6044,"children":6045},{"style":1047},[6046],{"type":998,"value":6047}," birthday",{"type":993,"tag":1026,"props":6049,"children":6050},{"style":1053},[6051],{"type":998,"value":1144},{"type":993,"tag":1026,"props":6053,"children":6054},{"class":1028,"line":109},[6055,6059,6063],{"type":993,"tag":1026,"props":6056,"children":6057},{"style":1032},[6058],{"type":998,"value":5964},{"type":993,"tag":1026,"props":6060,"children":6061},{"style":1041},[6062],{"type":998,"value":5969},{"type":993,"tag":1026,"props":6064,"children":6065},{"style":1032},[6066],{"type":998,"value":6067},": Increase the dog's age by 1\n",{"type":993,"tag":1026,"props":6069,"children":6070},{"class":1028,"line":118},[6071],{"type":993,"tag":1026,"props":6072,"children":6073},{"style":1041},[6074],{"type":998,"value":5982},{"type":993,"tag":1026,"props":6076,"children":6077},{"class":1028,"line":127},[6078],{"type":993,"tag":1026,"props":6079,"children":6080},{"emptyLinePlaceholder":13},[6081],{"type":998,"value":1205},{"type":993,"tag":1026,"props":6083,"children":6084},{"class":1028,"line":136},[6085,6090,6094],{"type":993,"tag":1026,"props":6086,"children":6087},{"style":1032},[6088],{"type":998,"value":6089},"# ",{"type":993,"tag":1026,"props":6091,"children":6092},{"style":1041},[6093],{"type":998,"value":5969},{"type":993,"tag":1026,"props":6095,"children":6096},{"style":1032},[6097],{"type":998,"value":6098},": Create a dog object\n",{"type":993,"tag":1026,"props":6100,"children":6101},{"class":1028,"line":146},[6102,6107,6111,6116,6121,6125,6129],{"type":993,"tag":1026,"props":6103,"children":6104},{"style":1053},[6105],{"type":998,"value":6106},"my_dog ",{"type":993,"tag":1026,"props":6108,"children":6109},{"style":1041},[6110],{"type":998,"value":1093},{"type":993,"tag":1026,"props":6112,"children":6113},{"style":1053},[6114],{"type":998,"value":6115}," Dog(",{"type":993,"tag":1026,"props":6117,"children":6118},{"style":1160},[6119],{"type":998,"value":6120},"\"Buddy\"",{"type":993,"tag":1026,"props":6122,"children":6123},{"style":1053},[6124],{"type":998,"value":1240},{"type":993,"tag":1026,"props":6126,"children":6127},{"style":1067},[6128],{"type":998,"value":3180},{"type":993,"tag":1026,"props":6130,"children":6131},{"style":1053},[6132],{"type":998,"value":1250},{"type":993,"tag":1026,"props":6134,"children":6135},{"class":1028,"line":155},[6136],{"type":993,"tag":1026,"props":6137,"children":6138},{"emptyLinePlaceholder":13},[6139],{"type":998,"value":1205},{"type":993,"tag":1026,"props":6141,"children":6142},{"class":1028,"line":164},[6143,6147,6151],{"type":993,"tag":1026,"props":6144,"children":6145},{"style":1032},[6146],{"type":998,"value":6089},{"type":993,"tag":1026,"props":6148,"children":6149},{"style":1041},[6150],{"type":998,"value":5969},{"type":993,"tag":1026,"props":6152,"children":6153},{"style":1032},[6154],{"type":998,"value":6155},": Test your methods\n",{"type":993,"tag":1026,"props":6157,"children":6158},{"class":1028,"line":173},[6159,6163,6167,6171,6176,6180,6185,6189,6194,6198,6203,6207,6212],{"type":993,"tag":1026,"props":6160,"children":6161},{"style":1067},[6162],{"type":998,"value":1299},{"type":993,"tag":1026,"props":6164,"children":6165},{"style":1053},[6166],{"type":998,"value":1316},{"type":993,"tag":1026,"props":6168,"children":6169},{"style":1041},[6170],{"type":998,"value":1321},{"type":993,"tag":1026,"props":6172,"children":6173},{"style":1160},[6174],{"type":998,"value":6175},"\"My dog's name is ",{"type":993,"tag":1026,"props":6177,"children":6178},{"style":1067},[6179],{"type":998,"value":1331},{"type":993,"tag":1026,"props":6181,"children":6182},{"style":1053},[6183],{"type":998,"value":6184},"my_dog.name",{"type":993,"tag":1026,"props":6186,"children":6187},{"style":1067},[6188],{"type":998,"value":1178},{"type":993,"tag":1026,"props":6190,"children":6191},{"style":1160},[6192],{"type":998,"value":6193}," and he is ",{"type":993,"tag":1026,"props":6195,"children":6196},{"style":1067},[6197],{"type":998,"value":1331},{"type":993,"tag":1026,"props":6199,"children":6200},{"style":1053},[6201],{"type":998,"value":6202},"my_dog.age",{"type":993,"tag":1026,"props":6204,"children":6205},{"style":1067},[6206],{"type":998,"value":1178},{"type":993,"tag":1026,"props":6208,"children":6209},{"style":1160},[6210],{"type":998,"value":6211}," years old\"",{"type":993,"tag":1026,"props":6213,"children":6214},{"style":1053},[6215],{"type":998,"value":1250},{"type":993,"tag":1026,"props":6217,"children":6218},{"class":1028,"line":182},[6219],{"type":993,"tag":1026,"props":6220,"children":6221},{"style":1053},[6222],{"type":998,"value":6223},"my_dog.bark()\n",{"type":993,"tag":1026,"props":6225,"children":6226},{"class":1028,"line":191},[6227],{"type":993,"tag":1026,"props":6228,"children":6229},{"style":1053},[6230],{"type":998,"value":6231},"my_dog.birthday()\n",{"type":993,"tag":1026,"props":6233,"children":6234},{"class":1028,"line":201},[6235,6239,6243,6247,6252,6256,6260,6264,6268,6272,6276,6280,6284],{"type":993,"tag":1026,"props":6236,"children":6237},{"style":1067},[6238],{"type":998,"value":1299},{"type":993,"tag":1026,"props":6240,"children":6241},{"style":1053},[6242],{"type":998,"value":1316},{"type":993,"tag":1026,"props":6244,"children":6245},{"style":1041},[6246],{"type":998,"value":1321},{"type":993,"tag":1026,"props":6248,"children":6249},{"style":1160},[6250],{"type":998,"value":6251},"\"After birthday: ",{"type":993,"tag":1026,"props":6253,"children":6254},{"style":1067},[6255],{"type":998,"value":1331},{"type":993,"tag":1026,"props":6257,"children":6258},{"style":1053},[6259],{"type":998,"value":6184},{"type":993,"tag":1026,"props":6261,"children":6262},{"style":1067},[6263],{"type":998,"value":1178},{"type":993,"tag":1026,"props":6265,"children":6266},{"style":1160},[6267],{"type":998,"value":1792},{"type":993,"tag":1026,"props":6269,"children":6270},{"style":1067},[6271],{"type":998,"value":1331},{"type":993,"tag":1026,"props":6273,"children":6274},{"style":1053},[6275],{"type":998,"value":6202},{"type":993,"tag":1026,"props":6277,"children":6278},{"style":1067},[6279],{"type":998,"value":1178},{"type":993,"tag":1026,"props":6281,"children":6282},{"style":1160},[6283],{"type":998,"value":6211},{"type":993,"tag":1026,"props":6285,"children":6286},{"style":1053},[6287],{"type":998,"value":1250},{"type":993,"tag":1520,"props":6289,"children":6291},{"id":6290},"solution-and-explanation",[6292],{"type":998,"value":6293},"Solution and Explanation 💡",{"type":993,"tag":6295,"props":6296,"children":6297},"details",{},[6298,6306,6755,6763],{"type":993,"tag":6299,"props":6300,"children":6303},"summary",{"className":6301},[6302],"cursor-pointer",[6304],{"type":998,"value":6305},"Click to see the complete solution",{"type":993,"tag":1012,"props":6307,"children":6308},{},[6309],{"type":993,"tag":1016,"props":6310,"children":6312},{"className":1018,"code":6311,"language":6,"meta":8,"style":8},"class Dog:\n    def __init__(self, name, age):\n        # Set the name and age attributes\n        self.name = name\n        self.age = age\n    \n    def bark(self):\n        # Make the dog bark (print a message)\n        print(f\"{self.name} says Woof!\")\n    \n    def birthday(self):\n        # Increase the dog's age by 1\n        self.age += 1\n        print(f\"Happy birthday {self.name}! Now {self.age} years old.\")\n\n# Create a dog object\nmy_dog = Dog(\"Buddy\", 3)\n\n# Test your methods\nprint(f\"My dog's name is {my_dog.name} and he is {my_dog.age} years old\")\nmy_dog.bark()\nmy_dog.birthday()\nprint(f\"After birthday: {my_dog.name} is now {my_dog.age} years old\")\n",[6313],{"type":993,"tag":1022,"props":6314,"children":6315},{"__ignoreMap":8},[6316,6331,6346,6354,6373,6393,6400,6415,6423,6463,6470,6485,6493,6512,6570,6577,6585,6616,6623,6631,6686,6693,6700],{"type":993,"tag":1026,"props":6317,"children":6318},{"class":1028,"line":12},[6319,6323,6327],{"type":993,"tag":1026,"props":6320,"children":6321},{"style":1041},[6322],{"type":998,"value":1044},{"type":993,"tag":1026,"props":6324,"children":6325},{"style":1047},[6326],{"type":998,"value":5937},{"type":993,"tag":1026,"props":6328,"children":6329},{"style":1053},[6330],{"type":998,"value":1056},{"type":993,"tag":1026,"props":6332,"children":6333},{"class":1028,"line":27},[6334,6338,6342],{"type":993,"tag":1026,"props":6335,"children":6336},{"style":1041},[6337],{"type":998,"value":1064},{"type":993,"tag":1026,"props":6339,"children":6340},{"style":1067},[6341],{"type":998,"value":1070},{"type":993,"tag":1026,"props":6343,"children":6344},{"style":1053},[6345],{"type":998,"value":1579},{"type":993,"tag":1026,"props":6347,"children":6348},{"class":1028,"line":36},[6349],{"type":993,"tag":1026,"props":6350,"children":6351},{"style":1032},[6352],{"type":998,"value":6353},"        # Set the name and age attributes\n",{"type":993,"tag":1026,"props":6355,"children":6356},{"class":1028,"line":45},[6357,6361,6365,6369],{"type":993,"tag":1026,"props":6358,"children":6359},{"style":1067},[6360],{"type":998,"value":1083},{"type":993,"tag":1026,"props":6362,"children":6363},{"style":1053},[6364],{"type":998,"value":1591},{"type":993,"tag":1026,"props":6366,"children":6367},{"style":1041},[6368],{"type":998,"value":1093},{"type":993,"tag":1026,"props":6370,"children":6371},{"style":1053},[6372],{"type":998,"value":2471},{"type":993,"tag":1026,"props":6374,"children":6375},{"class":1028,"line":54},[6376,6380,6384,6388],{"type":993,"tag":1026,"props":6377,"children":6378},{"style":1067},[6379],{"type":998,"value":1083},{"type":993,"tag":1026,"props":6381,"children":6382},{"style":1053},[6383],{"type":998,"value":1617},{"type":993,"tag":1026,"props":6385,"children":6386},{"style":1041},[6387],{"type":998,"value":1093},{"type":993,"tag":1026,"props":6389,"children":6390},{"style":1053},[6391],{"type":998,"value":6392}," age\n",{"type":993,"tag":1026,"props":6394,"children":6395},{"class":1028,"line":63},[6396],{"type":993,"tag":1026,"props":6397,"children":6398},{"style":1053},[6399],{"type":998,"value":1127},{"type":993,"tag":1026,"props":6401,"children":6402},{"class":1028,"line":72},[6403,6407,6411],{"type":993,"tag":1026,"props":6404,"children":6405},{"style":1041},[6406],{"type":998,"value":1064},{"type":993,"tag":1026,"props":6408,"children":6409},{"style":1047},[6410],{"type":998,"value":6001},{"type":993,"tag":1026,"props":6412,"children":6413},{"style":1053},[6414],{"type":998,"value":1144},{"type":993,"tag":1026,"props":6416,"children":6417},{"class":1028,"line":81},[6418],{"type":993,"tag":1026,"props":6419,"children":6420},{"style":1032},[6421],{"type":998,"value":6422},"        # Make the dog bark (print a message)\n",{"type":993,"tag":1026,"props":6424,"children":6425},{"class":1028,"line":91},[6426,6430,6434,6438,6442,6446,6450,6454,6459],{"type":993,"tag":1026,"props":6427,"children":6428},{"style":1067},[6429],{"type":998,"value":1918},{"type":993,"tag":1026,"props":6431,"children":6432},{"style":1053},[6433],{"type":998,"value":1316},{"type":993,"tag":1026,"props":6435,"children":6436},{"style":1041},[6437],{"type":998,"value":1321},{"type":993,"tag":1026,"props":6439,"children":6440},{"style":1160},[6441],{"type":998,"value":1345},{"type":993,"tag":1026,"props":6443,"children":6444},{"style":1067},[6445],{"type":998,"value":1168},{"type":993,"tag":1026,"props":6447,"children":6448},{"style":1053},[6449],{"type":998,"value":1684},{"type":993,"tag":1026,"props":6451,"children":6452},{"style":1067},[6453],{"type":998,"value":1178},{"type":993,"tag":1026,"props":6455,"children":6456},{"style":1160},[6457],{"type":998,"value":6458}," says Woof!\"",{"type":993,"tag":1026,"props":6460,"children":6461},{"style":1053},[6462],{"type":998,"value":1250},{"type":993,"tag":1026,"props":6464,"children":6465},{"class":1028,"line":100},[6466],{"type":993,"tag":1026,"props":6467,"children":6468},{"style":1053},[6469],{"type":998,"value":1127},{"type":993,"tag":1026,"props":6471,"children":6472},{"class":1028,"line":109},[6473,6477,6481],{"type":993,"tag":1026,"props":6474,"children":6475},{"style":1041},[6476],{"type":998,"value":1064},{"type":993,"tag":1026,"props":6478,"children":6479},{"style":1047},[6480],{"type":998,"value":6047},{"type":993,"tag":1026,"props":6482,"children":6483},{"style":1053},[6484],{"type":998,"value":1144},{"type":993,"tag":1026,"props":6486,"children":6487},{"class":1028,"line":118},[6488],{"type":993,"tag":1026,"props":6489,"children":6490},{"style":1032},[6491],{"type":998,"value":6492},"        # Increase the dog's age by 1\n",{"type":993,"tag":1026,"props":6494,"children":6495},{"class":1028,"line":127},[6496,6500,6504,6508],{"type":993,"tag":1026,"props":6497,"children":6498},{"style":1067},[6499],{"type":998,"value":1083},{"type":993,"tag":1026,"props":6501,"children":6502},{"style":1053},[6503],{"type":998,"value":1617},{"type":993,"tag":1026,"props":6505,"children":6506},{"style":1041},[6507],{"type":998,"value":1754},{"type":993,"tag":1026,"props":6509,"children":6510},{"style":1067},[6511],{"type":998,"value":1759},{"type":993,"tag":1026,"props":6513,"children":6514},{"class":1028,"line":136},[6515,6519,6523,6527,6532,6536,6540,6544,6549,6553,6557,6561,6566],{"type":993,"tag":1026,"props":6516,"children":6517},{"style":1067},[6518],{"type":998,"value":1918},{"type":993,"tag":1026,"props":6520,"children":6521},{"style":1053},[6522],{"type":998,"value":1316},{"type":993,"tag":1026,"props":6524,"children":6525},{"style":1041},[6526],{"type":998,"value":1321},{"type":993,"tag":1026,"props":6528,"children":6529},{"style":1160},[6530],{"type":998,"value":6531},"\"Happy birthday ",{"type":993,"tag":1026,"props":6533,"children":6534},{"style":1067},[6535],{"type":998,"value":1168},{"type":993,"tag":1026,"props":6537,"children":6538},{"style":1053},[6539],{"type":998,"value":1684},{"type":993,"tag":1026,"props":6541,"children":6542},{"style":1067},[6543],{"type":998,"value":1178},{"type":993,"tag":1026,"props":6545,"children":6546},{"style":1160},[6547],{"type":998,"value":6548},"! Now ",{"type":993,"tag":1026,"props":6550,"children":6551},{"style":1067},[6552],{"type":998,"value":1168},{"type":993,"tag":1026,"props":6554,"children":6555},{"style":1053},[6556],{"type":998,"value":1702},{"type":993,"tag":1026,"props":6558,"children":6559},{"style":1067},[6560],{"type":998,"value":1178},{"type":993,"tag":1026,"props":6562,"children":6563},{"style":1160},[6564],{"type":998,"value":6565}," years old.\"",{"type":993,"tag":1026,"props":6567,"children":6568},{"style":1053},[6569],{"type":998,"value":1250},{"type":993,"tag":1026,"props":6571,"children":6572},{"class":1028,"line":146},[6573],{"type":993,"tag":1026,"props":6574,"children":6575},{"emptyLinePlaceholder":13},[6576],{"type":998,"value":1205},{"type":993,"tag":1026,"props":6578,"children":6579},{"class":1028,"line":155},[6580],{"type":993,"tag":1026,"props":6581,"children":6582},{"style":1032},[6583],{"type":998,"value":6584},"# Create a dog object\n",{"type":993,"tag":1026,"props":6586,"children":6587},{"class":1028,"line":164},[6588,6592,6596,6600,6604,6608,6612],{"type":993,"tag":1026,"props":6589,"children":6590},{"style":1053},[6591],{"type":998,"value":6106},{"type":993,"tag":1026,"props":6593,"children":6594},{"style":1041},[6595],{"type":998,"value":1093},{"type":993,"tag":1026,"props":6597,"children":6598},{"style":1053},[6599],{"type":998,"value":6115},{"type":993,"tag":1026,"props":6601,"children":6602},{"style":1160},[6603],{"type":998,"value":6120},{"type":993,"tag":1026,"props":6605,"children":6606},{"style":1053},[6607],{"type":998,"value":1240},{"type":993,"tag":1026,"props":6609,"children":6610},{"style":1067},[6611],{"type":998,"value":3180},{"type":993,"tag":1026,"props":6613,"children":6614},{"style":1053},[6615],{"type":998,"value":1250},{"type":993,"tag":1026,"props":6617,"children":6618},{"class":1028,"line":173},[6619],{"type":993,"tag":1026,"props":6620,"children":6621},{"emptyLinePlaceholder":13},[6622],{"type":998,"value":1205},{"type":993,"tag":1026,"props":6624,"children":6625},{"class":1028,"line":182},[6626],{"type":993,"tag":1026,"props":6627,"children":6628},{"style":1032},[6629],{"type":998,"value":6630},"# Test your methods\n",{"type":993,"tag":1026,"props":6632,"children":6633},{"class":1028,"line":191},[6634,6638,6642,6646,6650,6654,6658,6662,6666,6670,6674,6678,6682],{"type":993,"tag":1026,"props":6635,"children":6636},{"style":1067},[6637],{"type":998,"value":1299},{"type":993,"tag":1026,"props":6639,"children":6640},{"style":1053},[6641],{"type":998,"value":1316},{"type":993,"tag":1026,"props":6643,"children":6644},{"style":1041},[6645],{"type":998,"value":1321},{"type":993,"tag":1026,"props":6647,"children":6648},{"style":1160},[6649],{"type":998,"value":6175},{"type":993,"tag":1026,"props":6651,"children":6652},{"style":1067},[6653],{"type":998,"value":1331},{"type":993,"tag":1026,"props":6655,"children":6656},{"style":1053},[6657],{"type":998,"value":6184},{"type":993,"tag":1026,"props":6659,"children":6660},{"style":1067},[6661],{"type":998,"value":1178},{"type":993,"tag":1026,"props":6663,"children":6664},{"style":1160},[6665],{"type":998,"value":6193},{"type":993,"tag":1026,"props":6667,"children":6668},{"style":1067},[6669],{"type":998,"value":1331},{"type":993,"tag":1026,"props":6671,"children":6672},{"style":1053},[6673],{"type":998,"value":6202},{"type":993,"tag":1026,"props":6675,"children":6676},{"style":1067},[6677],{"type":998,"value":1178},{"type":993,"tag":1026,"props":6679,"children":6680},{"style":1160},[6681],{"type":998,"value":6211},{"type":993,"tag":1026,"props":6683,"children":6684},{"style":1053},[6685],{"type":998,"value":1250},{"type":993,"tag":1026,"props":6687,"children":6688},{"class":1028,"line":201},[6689],{"type":993,"tag":1026,"props":6690,"children":6691},{"style":1053},[6692],{"type":998,"value":6223},{"type":993,"tag":1026,"props":6694,"children":6695},{"class":1028,"line":210},[6696],{"type":993,"tag":1026,"props":6697,"children":6698},{"style":1053},[6699],{"type":998,"value":6231},{"type":993,"tag":1026,"props":6701,"children":6702},{"class":1028,"line":219},[6703,6707,6711,6715,6719,6723,6727,6731,6735,6739,6743,6747,6751],{"type":993,"tag":1026,"props":6704,"children":6705},{"style":1067},[6706],{"type":998,"value":1299},{"type":993,"tag":1026,"props":6708,"children":6709},{"style":1053},[6710],{"type":998,"value":1316},{"type":993,"tag":1026,"props":6712,"children":6713},{"style":1041},[6714],{"type":998,"value":1321},{"type":993,"tag":1026,"props":6716,"children":6717},{"style":1160},[6718],{"type":998,"value":6251},{"type":993,"tag":1026,"props":6720,"children":6721},{"style":1067},[6722],{"type":998,"value":1331},{"type":993,"tag":1026,"props":6724,"children":6725},{"style":1053},[6726],{"type":998,"value":6184},{"type":993,"tag":1026,"props":6728,"children":6729},{"style":1067},[6730],{"type":998,"value":1178},{"type":993,"tag":1026,"props":6732,"children":6733},{"style":1160},[6734],{"type":998,"value":1792},{"type":993,"tag":1026,"props":6736,"children":6737},{"style":1067},[6738],{"type":998,"value":1331},{"type":993,"tag":1026,"props":6740,"children":6741},{"style":1053},[6742],{"type":998,"value":6202},{"type":993,"tag":1026,"props":6744,"children":6745},{"style":1067},[6746],{"type":998,"value":1178},{"type":993,"tag":1026,"props":6748,"children":6749},{"style":1160},[6750],{"type":998,"value":6211},{"type":993,"tag":1026,"props":6752,"children":6753},{"style":1053},[6754],{"type":998,"value":1250},{"type":993,"tag":1001,"props":6756,"children":6757},{},[6758],{"type":993,"tag":1414,"props":6759,"children":6760},{},[6761],{"type":998,"value":6762},"Key Learning Points:",{"type":993,"tag":1420,"props":6764,"children":6765},{},[6766,6786,6801,6812,6823],{"type":993,"tag":1424,"props":6767,"children":6768},{},[6769,6771,6776,6778,6784],{"type":998,"value":6770},"📌 ",{"type":993,"tag":1414,"props":6772,"children":6773},{},[6774],{"type":998,"value":6775},"Class definition",{"type":998,"value":6777},": Use ",{"type":993,"tag":1022,"props":6779,"children":6781},{"className":6780},[],[6782],{"type":998,"value":6783},"class ClassName:",{"type":998,"value":6785}," to define a class",{"type":993,"tag":1424,"props":6787,"children":6788},{},[6789,6790,6799],{"type":998,"value":6770},{"type":993,"tag":1414,"props":6791,"children":6792},{},[6793,6797],{"type":993,"tag":1414,"props":6794,"children":6795},{},[6796],{"type":998,"value":1855},{"type":998,"value":6798}," method",{"type":998,"value":6800},": Constructor that sets up initial attributes when object is created",{"type":993,"tag":1424,"props":6802,"children":6803},{},[6804,6805,6810],{"type":998,"value":6770},{"type":993,"tag":1414,"props":6806,"children":6807},{},[6808],{"type":998,"value":6809},"self parameter",{"type":998,"value":6811},": Refers to the specific object instance being used",{"type":993,"tag":1424,"props":6813,"children":6814},{},[6815,6816,6821],{"type":998,"value":6770},{"type":993,"tag":1414,"props":6817,"children":6818},{},[6819],{"type":998,"value":6820},"Instance attributes",{"type":998,"value":6822},": Variables that belong to each object (self.name, self.age)",{"type":993,"tag":1424,"props":6824,"children":6825},{},[6826,6827,6832],{"type":998,"value":6770},{"type":993,"tag":1414,"props":6828,"children":6829},{},[6830],{"type":998,"value":6831},"Instance methods",{"type":998,"value":6833},": Functions that belong to the class and can access object attributes",{"type":993,"tag":1392,"props":6835,"children":6837},{"id":6836},"test-your-knowledge",[6838],{"type":998,"value":6839},"Test Your Knowledge",{"type":993,"tag":1001,"props":6841,"children":6842},{},[6843],{"type":998,"value":6844},"Test what you've learned about classes and objects:",{"type":993,"tag":6846,"props":6847,"children":6851},"redirect-button",{"icon":6848,"label":6849,"url":6850},"pi pi-send","Take Quiz","/tutorial-quiz/python/classes-and-objects",[],{"type":993,"tag":1392,"props":6853,"children":6855},{"id":6854},"whats-next",[6856],{"type":998,"value":6857},"What's Next?",{"type":993,"tag":1001,"props":6859,"children":6860},{},[6861],{"type":998,"value":6862},"Now that you understand how to create classes and objects, you're ready to learn about object methods. Methods are what make objects truly powerful by defining the actions they can perform.",{"type":993,"tag":1001,"props":6864,"children":6865},{},[6866,6868,6873],{"type":998,"value":6867},"Ready to continue? Check out our lesson on ",{"type":993,"tag":6869,"props":6870,"children":6871},"a",{"href":690},[6872],{"type":998,"value":691},{"type":998,"value":6874},".",{"type":993,"tag":6876,"props":6877,"children":6878},"style",{},[6879],{"type":998,"value":6880},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .app-dark-mode .shiki span {color: var(--shiki-app-dark-mode);background: var(--shiki-app-dark-mode-bg);font-style: var(--shiki-app-dark-mode-font-style);font-weight: var(--shiki-app-dark-mode-font-weight);text-decoration: var(--shiki-app-dark-mode-text-decoration);}html.app-dark-mode .shiki span {color: var(--shiki-app-dark-mode);background: var(--shiki-app-dark-mode-bg);font-style: var(--shiki-app-dark-mode-font-style);font-weight: var(--shiki-app-dark-mode-font-weight);text-decoration: var(--shiki-app-dark-mode-text-decoration);}",{"title":8,"searchDepth":36,"depth":36,"links":6882},[6883,6888,6891,6895,6896,6900,6904,6905],{"id":1394,"depth":27,"text":1397,"children":6884},[6885,6886],{"id":1522,"depth":36,"text":1525},{"id":1847,"depth":36,"text":6887},"The init Method",{"id":2299,"depth":27,"text":2302,"children":6889},[6890],{"id":2401,"depth":36,"text":2404},{"id":2979,"depth":27,"text":2982,"children":6892},[6893,6894],{"id":2990,"depth":36,"text":2993},{"id":3397,"depth":36,"text":3400},{"id":3882,"depth":27,"text":3885},{"id":4052,"depth":27,"text":4055,"children":6897},[6898,6899],{"id":4063,"depth":36,"text":4066},{"id":4513,"depth":36,"text":4516},{"id":5048,"depth":27,"text":5051,"children":6901},[6902,6903],{"id":5158,"depth":36,"text":5161},{"id":6290,"depth":36,"text":6293},{"id":6836,"depth":27,"text":6839},{"id":6854,"depth":27,"text":6857},1782373746768]