[{"data":1,"prerenderedAt":9804},["ShallowReactive",2],{"tutorials-python":3,"category-items-python":987,"content-/python/object-methods":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",[689],{"_path":690,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":691,"description":692,"slug":693,"parentId":671,"order":694,"body":989,"_type":15,"_id":695,"_source":17,"_file":696,"_stem":697,"_extension":20},{"type":990,"children":991,"toc":9780},"root",[992,1001,1007,1012,1374,1381,1394,1533,1540,1552,2174,2180,2192,2703,2709,2714,2720,2725,3367,3373,3378,4238,4244,4249,4465,4471,4490,4978,4984,4989,5669,5943,5949,5954,6119,6125,6130,6136,6141,7113,7119,7125,7130,8198,8296,8301,8892,8898,9721,9734,9740,9745,9752,9758,9763,9774],{"type":993,"tag":994,"props":995,"children":997},"element","h1",{"id":996},"️-object-methods",[998],{"type":999,"value":1000},"text","⚙️ Object Methods",{"type":993,"tag":1002,"props":1003,"children":1004},"p",{},[1005],{"type":999,"value":1006},"Object methods are functions that belong to objects and define what actions those objects can perform. While attributes store data about objects, methods provide the behaviors and functionality that make objects useful and interactive. Understanding methods transforms static data containers into dynamic, responsive entities.",{"type":993,"tag":1002,"props":1008,"children":1009},{},[1010],{"type":999,"value":1011},"Think of methods as the \"verbs\" of your objects - if a car object has attributes like color and speed, its methods might include start(), stop(), and accelerate(). Methods bridge the gap between data and action.",{"type":993,"tag":1013,"props":1014,"children":1015},"code-try",{},[1016],{"type":993,"tag":1017,"props":1018,"children":1021},"pre",{"className":1019,"code":1020,"language":6,"meta":8,"style":8},"language-python shiki shiki-themes github-light github-dark","# Methods give objects behavior\nclass Calculator:\n    def __init__(self):\n        self.result = 0\n    \n    def add(self, number):\n        self.result += number\n        return self.result\n    \n    def multiply(self, number):\n        self.result *= number\n        return self.result\n    \n    def clear(self):\n        self.result = 0\n        return \"Calculator cleared\"\n\ncalc = Calculator()\nprint(calc.add(5))        # 5\nprint(calc.multiply(3))   # 15\nprint(calc.clear())       # Calculator cleared\n",[1022],{"type":993,"tag":1023,"props":1024,"children":1025},"code",{"__ignoreMap":8},[1026,1037,1058,1077,1100,1108,1125,1146,1164,1171,1187,1207,1222,1229,1245,1264,1277,1285,1302,1330,1357],{"type":993,"tag":1027,"props":1028,"children":1030},"span",{"class":1029,"line":12},"line",[1031],{"type":993,"tag":1027,"props":1032,"children":1034},{"style":1033},"--shiki-default:#6A737D;--shiki-app-dark-mode:#6A737D",[1035],{"type":999,"value":1036},"# Methods give objects behavior\n",{"type":993,"tag":1027,"props":1038,"children":1039},{"class":1029,"line":27},[1040,1046,1052],{"type":993,"tag":1027,"props":1041,"children":1043},{"style":1042},"--shiki-default:#D73A49;--shiki-app-dark-mode:#F97583",[1044],{"type":999,"value":1045},"class",{"type":993,"tag":1027,"props":1047,"children":1049},{"style":1048},"--shiki-default:#6F42C1;--shiki-app-dark-mode:#B392F0",[1050],{"type":999,"value":1051}," Calculator",{"type":993,"tag":1027,"props":1053,"children":1055},{"style":1054},"--shiki-default:#24292E;--shiki-app-dark-mode:#E1E4E8",[1056],{"type":999,"value":1057},":\n",{"type":993,"tag":1027,"props":1059,"children":1060},{"class":1029,"line":36},[1061,1066,1072],{"type":993,"tag":1027,"props":1062,"children":1063},{"style":1042},[1064],{"type":999,"value":1065},"    def",{"type":993,"tag":1027,"props":1067,"children":1069},{"style":1068},"--shiki-default:#005CC5;--shiki-app-dark-mode:#79B8FF",[1070],{"type":999,"value":1071}," __init__",{"type":993,"tag":1027,"props":1073,"children":1074},{"style":1054},[1075],{"type":999,"value":1076},"(self):\n",{"type":993,"tag":1027,"props":1078,"children":1079},{"class":1029,"line":45},[1080,1085,1090,1095],{"type":993,"tag":1027,"props":1081,"children":1082},{"style":1068},[1083],{"type":999,"value":1084},"        self",{"type":993,"tag":1027,"props":1086,"children":1087},{"style":1054},[1088],{"type":999,"value":1089},".result ",{"type":993,"tag":1027,"props":1091,"children":1092},{"style":1042},[1093],{"type":999,"value":1094},"=",{"type":993,"tag":1027,"props":1096,"children":1097},{"style":1068},[1098],{"type":999,"value":1099}," 0\n",{"type":993,"tag":1027,"props":1101,"children":1102},{"class":1029,"line":54},[1103],{"type":993,"tag":1027,"props":1104,"children":1105},{"style":1054},[1106],{"type":999,"value":1107},"    \n",{"type":993,"tag":1027,"props":1109,"children":1110},{"class":1029,"line":63},[1111,1115,1120],{"type":993,"tag":1027,"props":1112,"children":1113},{"style":1042},[1114],{"type":999,"value":1065},{"type":993,"tag":1027,"props":1116,"children":1117},{"style":1048},[1118],{"type":999,"value":1119}," add",{"type":993,"tag":1027,"props":1121,"children":1122},{"style":1054},[1123],{"type":999,"value":1124},"(self, number):\n",{"type":993,"tag":1027,"props":1126,"children":1127},{"class":1029,"line":72},[1128,1132,1136,1141],{"type":993,"tag":1027,"props":1129,"children":1130},{"style":1068},[1131],{"type":999,"value":1084},{"type":993,"tag":1027,"props":1133,"children":1134},{"style":1054},[1135],{"type":999,"value":1089},{"type":993,"tag":1027,"props":1137,"children":1138},{"style":1042},[1139],{"type":999,"value":1140},"+=",{"type":993,"tag":1027,"props":1142,"children":1143},{"style":1054},[1144],{"type":999,"value":1145}," number\n",{"type":993,"tag":1027,"props":1147,"children":1148},{"class":1029,"line":81},[1149,1154,1159],{"type":993,"tag":1027,"props":1150,"children":1151},{"style":1042},[1152],{"type":999,"value":1153},"        return",{"type":993,"tag":1027,"props":1155,"children":1156},{"style":1068},[1157],{"type":999,"value":1158}," self",{"type":993,"tag":1027,"props":1160,"children":1161},{"style":1054},[1162],{"type":999,"value":1163},".result\n",{"type":993,"tag":1027,"props":1165,"children":1166},{"class":1029,"line":91},[1167],{"type":993,"tag":1027,"props":1168,"children":1169},{"style":1054},[1170],{"type":999,"value":1107},{"type":993,"tag":1027,"props":1172,"children":1173},{"class":1029,"line":100},[1174,1178,1183],{"type":993,"tag":1027,"props":1175,"children":1176},{"style":1042},[1177],{"type":999,"value":1065},{"type":993,"tag":1027,"props":1179,"children":1180},{"style":1048},[1181],{"type":999,"value":1182}," multiply",{"type":993,"tag":1027,"props":1184,"children":1185},{"style":1054},[1186],{"type":999,"value":1124},{"type":993,"tag":1027,"props":1188,"children":1189},{"class":1029,"line":109},[1190,1194,1198,1203],{"type":993,"tag":1027,"props":1191,"children":1192},{"style":1068},[1193],{"type":999,"value":1084},{"type":993,"tag":1027,"props":1195,"children":1196},{"style":1054},[1197],{"type":999,"value":1089},{"type":993,"tag":1027,"props":1199,"children":1200},{"style":1042},[1201],{"type":999,"value":1202},"*=",{"type":993,"tag":1027,"props":1204,"children":1205},{"style":1054},[1206],{"type":999,"value":1145},{"type":993,"tag":1027,"props":1208,"children":1209},{"class":1029,"line":118},[1210,1214,1218],{"type":993,"tag":1027,"props":1211,"children":1212},{"style":1042},[1213],{"type":999,"value":1153},{"type":993,"tag":1027,"props":1215,"children":1216},{"style":1068},[1217],{"type":999,"value":1158},{"type":993,"tag":1027,"props":1219,"children":1220},{"style":1054},[1221],{"type":999,"value":1163},{"type":993,"tag":1027,"props":1223,"children":1224},{"class":1029,"line":127},[1225],{"type":993,"tag":1027,"props":1226,"children":1227},{"style":1054},[1228],{"type":999,"value":1107},{"type":993,"tag":1027,"props":1230,"children":1231},{"class":1029,"line":136},[1232,1236,1241],{"type":993,"tag":1027,"props":1233,"children":1234},{"style":1042},[1235],{"type":999,"value":1065},{"type":993,"tag":1027,"props":1237,"children":1238},{"style":1048},[1239],{"type":999,"value":1240}," clear",{"type":993,"tag":1027,"props":1242,"children":1243},{"style":1054},[1244],{"type":999,"value":1076},{"type":993,"tag":1027,"props":1246,"children":1247},{"class":1029,"line":146},[1248,1252,1256,1260],{"type":993,"tag":1027,"props":1249,"children":1250},{"style":1068},[1251],{"type":999,"value":1084},{"type":993,"tag":1027,"props":1253,"children":1254},{"style":1054},[1255],{"type":999,"value":1089},{"type":993,"tag":1027,"props":1257,"children":1258},{"style":1042},[1259],{"type":999,"value":1094},{"type":993,"tag":1027,"props":1261,"children":1262},{"style":1068},[1263],{"type":999,"value":1099},{"type":993,"tag":1027,"props":1265,"children":1266},{"class":1029,"line":155},[1267,1271],{"type":993,"tag":1027,"props":1268,"children":1269},{"style":1042},[1270],{"type":999,"value":1153},{"type":993,"tag":1027,"props":1272,"children":1274},{"style":1273},"--shiki-default:#032F62;--shiki-app-dark-mode:#9ECBFF",[1275],{"type":999,"value":1276}," \"Calculator cleared\"\n",{"type":993,"tag":1027,"props":1278,"children":1279},{"class":1029,"line":164},[1280],{"type":993,"tag":1027,"props":1281,"children":1282},{"emptyLinePlaceholder":13},[1283],{"type":999,"value":1284},"\n",{"type":993,"tag":1027,"props":1286,"children":1287},{"class":1029,"line":173},[1288,1293,1297],{"type":993,"tag":1027,"props":1289,"children":1290},{"style":1054},[1291],{"type":999,"value":1292},"calc ",{"type":993,"tag":1027,"props":1294,"children":1295},{"style":1042},[1296],{"type":999,"value":1094},{"type":993,"tag":1027,"props":1298,"children":1299},{"style":1054},[1300],{"type":999,"value":1301}," Calculator()\n",{"type":993,"tag":1027,"props":1303,"children":1304},{"class":1029,"line":182},[1305,1310,1315,1320,1325],{"type":993,"tag":1027,"props":1306,"children":1307},{"style":1068},[1308],{"type":999,"value":1309},"print",{"type":993,"tag":1027,"props":1311,"children":1312},{"style":1054},[1313],{"type":999,"value":1314},"(calc.add(",{"type":993,"tag":1027,"props":1316,"children":1317},{"style":1068},[1318],{"type":999,"value":1319},"5",{"type":993,"tag":1027,"props":1321,"children":1322},{"style":1054},[1323],{"type":999,"value":1324},"))        ",{"type":993,"tag":1027,"props":1326,"children":1327},{"style":1033},[1328],{"type":999,"value":1329},"# 5\n",{"type":993,"tag":1027,"props":1331,"children":1332},{"class":1029,"line":191},[1333,1337,1342,1347,1352],{"type":993,"tag":1027,"props":1334,"children":1335},{"style":1068},[1336],{"type":999,"value":1309},{"type":993,"tag":1027,"props":1338,"children":1339},{"style":1054},[1340],{"type":999,"value":1341},"(calc.multiply(",{"type":993,"tag":1027,"props":1343,"children":1344},{"style":1068},[1345],{"type":999,"value":1346},"3",{"type":993,"tag":1027,"props":1348,"children":1349},{"style":1054},[1350],{"type":999,"value":1351},"))   ",{"type":993,"tag":1027,"props":1353,"children":1354},{"style":1033},[1355],{"type":999,"value":1356},"# 15\n",{"type":993,"tag":1027,"props":1358,"children":1359},{"class":1029,"line":201},[1360,1364,1369],{"type":993,"tag":1027,"props":1361,"children":1362},{"style":1068},[1363],{"type":999,"value":1309},{"type":993,"tag":1027,"props":1365,"children":1366},{"style":1054},[1367],{"type":999,"value":1368},"(calc.clear())       ",{"type":993,"tag":1027,"props":1370,"children":1371},{"style":1033},[1372],{"type":999,"value":1373},"# Calculator cleared\n",{"type":993,"tag":1375,"props":1376,"children":1378},"h2",{"id":1377},"understanding-object-methods",[1379],{"type":999,"value":1380},"🎯 Understanding Object Methods",{"type":993,"tag":1002,"props":1382,"children":1383},{},[1384,1386,1392],{"type":999,"value":1385},"Methods are functions defined inside classes that operate on object data. They have access to the object's attributes through the special ",{"type":993,"tag":1023,"props":1387,"children":1389},{"className":1388},[],[1390],{"type":999,"value":1391},"self",{"type":999,"value":1393}," parameter, allowing them to read and modify the object's state.",{"type":993,"tag":1395,"props":1396,"children":1400},"info-box",{"title":1397,"type":1398,"emoji":1399},"Method Fundamentals","info","🔧",[1401,1410,1450,1458,1507,1515],{"type":993,"tag":1002,"props":1402,"children":1403},{},[1404],{"type":993,"tag":1405,"props":1406,"children":1407},"strong",{},[1408],{"type":999,"value":1409},"Method Structure:",{"type":993,"tag":1411,"props":1412,"children":1413},"ul",{},[1414,1428,1440,1445],{"type":993,"tag":1415,"props":1416,"children":1417},"li",{},[1418,1420,1426],{"type":999,"value":1419},"Defined inside class using ",{"type":993,"tag":1023,"props":1421,"children":1423},{"className":1422},[],[1424],{"type":999,"value":1425},"def",{"type":999,"value":1427}," keyword",{"type":993,"tag":1415,"props":1429,"children":1430},{},[1431,1433,1438],{"type":999,"value":1432},"First parameter is always ",{"type":993,"tag":1023,"props":1434,"children":1436},{"className":1435},[],[1437],{"type":999,"value":1391},{"type":999,"value":1439}," (represents the object)",{"type":993,"tag":1415,"props":1441,"children":1442},{},[1443],{"type":999,"value":1444},"Can access and modify object attributes",{"type":993,"tag":1415,"props":1446,"children":1447},{},[1448],{"type":999,"value":1449},"Can accept additional parameters and return values",{"type":993,"tag":1002,"props":1451,"children":1452},{},[1453],{"type":993,"tag":1405,"props":1454,"children":1455},{},[1456],{"type":999,"value":1457},"Method Types:",{"type":993,"tag":1411,"props":1459,"children":1460},{},[1461,1471,1497],{"type":993,"tag":1415,"props":1462,"children":1463},{},[1464,1469],{"type":993,"tag":1405,"props":1465,"children":1466},{},[1467],{"type":999,"value":1468},"Instance methods",{"type":999,"value":1470},": Work with specific object instances",{"type":993,"tag":1415,"props":1472,"children":1473},{},[1474,1479,1481,1487,1489,1495],{"type":993,"tag":1405,"props":1475,"children":1476},{},[1477],{"type":999,"value":1478},"Special methods",{"type":999,"value":1480},": Built-in behaviors (e.g., ",{"type":993,"tag":1023,"props":1482,"children":1484},{"className":1483},[],[1485],{"type":999,"value":1486},"__str__",{"type":999,"value":1488},", ",{"type":993,"tag":1023,"props":1490,"children":1492},{"className":1491},[],[1493],{"type":999,"value":1494},"__len__",{"type":999,"value":1496},")",{"type":993,"tag":1415,"props":1498,"children":1499},{},[1500,1505],{"type":993,"tag":1405,"props":1501,"children":1502},{},[1503],{"type":999,"value":1504},"Class methods",{"type":999,"value":1506},": Work with the class itself (advanced topic)",{"type":993,"tag":1002,"props":1508,"children":1509},{},[1510],{"type":993,"tag":1405,"props":1511,"children":1512},{},[1513],{"type":999,"value":1514},"Self Parameter:",{"type":993,"tag":1411,"props":1516,"children":1517},{},[1518,1523,1528],{"type":993,"tag":1415,"props":1519,"children":1520},{},[1521],{"type":999,"value":1522},"Automatically passed by Python when calling methods",{"type":993,"tag":1415,"props":1524,"children":1525},{},[1526],{"type":999,"value":1527},"Provides access to the object's attributes and other methods",{"type":993,"tag":1415,"props":1529,"children":1530},{},[1531],{"type":999,"value":1532},"Required for all instance methods even if not used",{"type":993,"tag":1534,"props":1535,"children":1537},"h3",{"id":1536},"defining-methods",[1538],{"type":999,"value":1539},"Defining Methods",{"type":993,"tag":1002,"props":1541,"children":1542},{},[1543,1545,1550],{"type":999,"value":1544},"Methods are defined similar to regular functions but must include ",{"type":993,"tag":1023,"props":1546,"children":1548},{"className":1547},[],[1549],{"type":999,"value":1391},{"type":999,"value":1551}," as the first parameter. This parameter gives methods access to the object's attributes and other methods within the same class.",{"type":993,"tag":1013,"props":1553,"children":1554},{},[1555],{"type":993,"tag":1017,"props":1556,"children":1558},{"className":1019,"code":1557,"language":6,"meta":8,"style":8},"class BankAccount:\n    def __init__(self, owner, balance=0):\n        self.owner = owner\n        self.balance = balance\n    \n    def get_balance(self):  # Method with no additional parameters\n        return f\"{self.owner}'s balance: ${self.balance}\"\n    \n    def deposit(self, amount):  # Method with parameter\n        if amount > 0:\n            self.balance += amount\n            return f\"Deposited ${amount}. New balance: ${self.balance}\"\n        return \"Invalid deposit amount\"\n    \n    def transfer(self, other_account, amount):  # Method with multiple parameters\n        if amount \u003C= self.balance:\n            self.balance -= amount\n            other_account.balance += amount\n            return f\"Transferred ${amount} to {other_account.owner}\"\n        return \"Insufficient funds\"\n\n# Using methods\nalice_account = BankAccount(\"Alice\", 100)\nbob_account = BankAccount(\"Bob\", 50)\n\nprint(alice_account.deposit(25))\nprint(alice_account.transfer(bob_account, 30))\nprint(bob_account.get_balance())\n",[1559],{"type":993,"tag":1023,"props":1560,"children":1561},{"__ignoreMap":8},[1562,1578,1608,1629,1650,1657,1679,1734,1741,1763,1790,1811,1863,1875,1882,1904,1929,1949,1965,2015,2027,2034,2042,2078,2112,2119,2141,2162],{"type":993,"tag":1027,"props":1563,"children":1564},{"class":1029,"line":12},[1565,1569,1574],{"type":993,"tag":1027,"props":1566,"children":1567},{"style":1042},[1568],{"type":999,"value":1045},{"type":993,"tag":1027,"props":1570,"children":1571},{"style":1048},[1572],{"type":999,"value":1573}," BankAccount",{"type":993,"tag":1027,"props":1575,"children":1576},{"style":1054},[1577],{"type":999,"value":1057},{"type":993,"tag":1027,"props":1579,"children":1580},{"class":1029,"line":27},[1581,1585,1589,1594,1598,1603],{"type":993,"tag":1027,"props":1582,"children":1583},{"style":1042},[1584],{"type":999,"value":1065},{"type":993,"tag":1027,"props":1586,"children":1587},{"style":1068},[1588],{"type":999,"value":1071},{"type":993,"tag":1027,"props":1590,"children":1591},{"style":1054},[1592],{"type":999,"value":1593},"(self, owner, balance",{"type":993,"tag":1027,"props":1595,"children":1596},{"style":1042},[1597],{"type":999,"value":1094},{"type":993,"tag":1027,"props":1599,"children":1600},{"style":1068},[1601],{"type":999,"value":1602},"0",{"type":993,"tag":1027,"props":1604,"children":1605},{"style":1054},[1606],{"type":999,"value":1607},"):\n",{"type":993,"tag":1027,"props":1609,"children":1610},{"class":1029,"line":36},[1611,1615,1620,1624],{"type":993,"tag":1027,"props":1612,"children":1613},{"style":1068},[1614],{"type":999,"value":1084},{"type":993,"tag":1027,"props":1616,"children":1617},{"style":1054},[1618],{"type":999,"value":1619},".owner ",{"type":993,"tag":1027,"props":1621,"children":1622},{"style":1042},[1623],{"type":999,"value":1094},{"type":993,"tag":1027,"props":1625,"children":1626},{"style":1054},[1627],{"type":999,"value":1628}," owner\n",{"type":993,"tag":1027,"props":1630,"children":1631},{"class":1029,"line":45},[1632,1636,1641,1645],{"type":993,"tag":1027,"props":1633,"children":1634},{"style":1068},[1635],{"type":999,"value":1084},{"type":993,"tag":1027,"props":1637,"children":1638},{"style":1054},[1639],{"type":999,"value":1640},".balance ",{"type":993,"tag":1027,"props":1642,"children":1643},{"style":1042},[1644],{"type":999,"value":1094},{"type":993,"tag":1027,"props":1646,"children":1647},{"style":1054},[1648],{"type":999,"value":1649}," balance\n",{"type":993,"tag":1027,"props":1651,"children":1652},{"class":1029,"line":54},[1653],{"type":993,"tag":1027,"props":1654,"children":1655},{"style":1054},[1656],{"type":999,"value":1107},{"type":993,"tag":1027,"props":1658,"children":1659},{"class":1029,"line":63},[1660,1664,1669,1674],{"type":993,"tag":1027,"props":1661,"children":1662},{"style":1042},[1663],{"type":999,"value":1065},{"type":993,"tag":1027,"props":1665,"children":1666},{"style":1048},[1667],{"type":999,"value":1668}," get_balance",{"type":993,"tag":1027,"props":1670,"children":1671},{"style":1054},[1672],{"type":999,"value":1673},"(self):  ",{"type":993,"tag":1027,"props":1675,"children":1676},{"style":1033},[1677],{"type":999,"value":1678},"# Method with no additional parameters\n",{"type":993,"tag":1027,"props":1680,"children":1681},{"class":1029,"line":72},[1682,1686,1691,1696,1701,1706,1711,1716,1720,1725,1729],{"type":993,"tag":1027,"props":1683,"children":1684},{"style":1042},[1685],{"type":999,"value":1153},{"type":993,"tag":1027,"props":1687,"children":1688},{"style":1042},[1689],{"type":999,"value":1690}," f",{"type":993,"tag":1027,"props":1692,"children":1693},{"style":1273},[1694],{"type":999,"value":1695},"\"",{"type":993,"tag":1027,"props":1697,"children":1698},{"style":1068},[1699],{"type":999,"value":1700},"{self",{"type":993,"tag":1027,"props":1702,"children":1703},{"style":1054},[1704],{"type":999,"value":1705},".owner",{"type":993,"tag":1027,"props":1707,"children":1708},{"style":1068},[1709],{"type":999,"value":1710},"}",{"type":993,"tag":1027,"props":1712,"children":1713},{"style":1273},[1714],{"type":999,"value":1715},"'s balance: $",{"type":993,"tag":1027,"props":1717,"children":1718},{"style":1068},[1719],{"type":999,"value":1700},{"type":993,"tag":1027,"props":1721,"children":1722},{"style":1054},[1723],{"type":999,"value":1724},".balance",{"type":993,"tag":1027,"props":1726,"children":1727},{"style":1068},[1728],{"type":999,"value":1710},{"type":993,"tag":1027,"props":1730,"children":1731},{"style":1273},[1732],{"type":999,"value":1733},"\"\n",{"type":993,"tag":1027,"props":1735,"children":1736},{"class":1029,"line":81},[1737],{"type":993,"tag":1027,"props":1738,"children":1739},{"style":1054},[1740],{"type":999,"value":1107},{"type":993,"tag":1027,"props":1742,"children":1743},{"class":1029,"line":91},[1744,1748,1753,1758],{"type":993,"tag":1027,"props":1745,"children":1746},{"style":1042},[1747],{"type":999,"value":1065},{"type":993,"tag":1027,"props":1749,"children":1750},{"style":1048},[1751],{"type":999,"value":1752}," deposit",{"type":993,"tag":1027,"props":1754,"children":1755},{"style":1054},[1756],{"type":999,"value":1757},"(self, amount):  ",{"type":993,"tag":1027,"props":1759,"children":1760},{"style":1033},[1761],{"type":999,"value":1762},"# Method with parameter\n",{"type":993,"tag":1027,"props":1764,"children":1765},{"class":1029,"line":100},[1766,1771,1776,1781,1786],{"type":993,"tag":1027,"props":1767,"children":1768},{"style":1042},[1769],{"type":999,"value":1770},"        if",{"type":993,"tag":1027,"props":1772,"children":1773},{"style":1054},[1774],{"type":999,"value":1775}," amount ",{"type":993,"tag":1027,"props":1777,"children":1778},{"style":1042},[1779],{"type":999,"value":1780},">",{"type":993,"tag":1027,"props":1782,"children":1783},{"style":1068},[1784],{"type":999,"value":1785}," 0",{"type":993,"tag":1027,"props":1787,"children":1788},{"style":1054},[1789],{"type":999,"value":1057},{"type":993,"tag":1027,"props":1791,"children":1792},{"class":1029,"line":109},[1793,1798,1802,1806],{"type":993,"tag":1027,"props":1794,"children":1795},{"style":1068},[1796],{"type":999,"value":1797},"            self",{"type":993,"tag":1027,"props":1799,"children":1800},{"style":1054},[1801],{"type":999,"value":1640},{"type":993,"tag":1027,"props":1803,"children":1804},{"style":1042},[1805],{"type":999,"value":1140},{"type":993,"tag":1027,"props":1807,"children":1808},{"style":1054},[1809],{"type":999,"value":1810}," amount\n",{"type":993,"tag":1027,"props":1812,"children":1813},{"class":1029,"line":118},[1814,1819,1823,1828,1833,1838,1842,1847,1851,1855,1859],{"type":993,"tag":1027,"props":1815,"children":1816},{"style":1042},[1817],{"type":999,"value":1818},"            return",{"type":993,"tag":1027,"props":1820,"children":1821},{"style":1042},[1822],{"type":999,"value":1690},{"type":993,"tag":1027,"props":1824,"children":1825},{"style":1273},[1826],{"type":999,"value":1827},"\"Deposited $",{"type":993,"tag":1027,"props":1829,"children":1830},{"style":1068},[1831],{"type":999,"value":1832},"{",{"type":993,"tag":1027,"props":1834,"children":1835},{"style":1054},[1836],{"type":999,"value":1837},"amount",{"type":993,"tag":1027,"props":1839,"children":1840},{"style":1068},[1841],{"type":999,"value":1710},{"type":993,"tag":1027,"props":1843,"children":1844},{"style":1273},[1845],{"type":999,"value":1846},". New balance: $",{"type":993,"tag":1027,"props":1848,"children":1849},{"style":1068},[1850],{"type":999,"value":1700},{"type":993,"tag":1027,"props":1852,"children":1853},{"style":1054},[1854],{"type":999,"value":1724},{"type":993,"tag":1027,"props":1856,"children":1857},{"style":1068},[1858],{"type":999,"value":1710},{"type":993,"tag":1027,"props":1860,"children":1861},{"style":1273},[1862],{"type":999,"value":1733},{"type":993,"tag":1027,"props":1864,"children":1865},{"class":1029,"line":127},[1866,1870],{"type":993,"tag":1027,"props":1867,"children":1868},{"style":1042},[1869],{"type":999,"value":1153},{"type":993,"tag":1027,"props":1871,"children":1872},{"style":1273},[1873],{"type":999,"value":1874}," \"Invalid deposit amount\"\n",{"type":993,"tag":1027,"props":1876,"children":1877},{"class":1029,"line":136},[1878],{"type":993,"tag":1027,"props":1879,"children":1880},{"style":1054},[1881],{"type":999,"value":1107},{"type":993,"tag":1027,"props":1883,"children":1884},{"class":1029,"line":146},[1885,1889,1894,1899],{"type":993,"tag":1027,"props":1886,"children":1887},{"style":1042},[1888],{"type":999,"value":1065},{"type":993,"tag":1027,"props":1890,"children":1891},{"style":1048},[1892],{"type":999,"value":1893}," transfer",{"type":993,"tag":1027,"props":1895,"children":1896},{"style":1054},[1897],{"type":999,"value":1898},"(self, other_account, amount):  ",{"type":993,"tag":1027,"props":1900,"children":1901},{"style":1033},[1902],{"type":999,"value":1903},"# Method with multiple parameters\n",{"type":993,"tag":1027,"props":1905,"children":1906},{"class":1029,"line":155},[1907,1911,1915,1920,1924],{"type":993,"tag":1027,"props":1908,"children":1909},{"style":1042},[1910],{"type":999,"value":1770},{"type":993,"tag":1027,"props":1912,"children":1913},{"style":1054},[1914],{"type":999,"value":1775},{"type":993,"tag":1027,"props":1916,"children":1917},{"style":1042},[1918],{"type":999,"value":1919},"\u003C=",{"type":993,"tag":1027,"props":1921,"children":1922},{"style":1068},[1923],{"type":999,"value":1158},{"type":993,"tag":1027,"props":1925,"children":1926},{"style":1054},[1927],{"type":999,"value":1928},".balance:\n",{"type":993,"tag":1027,"props":1930,"children":1931},{"class":1029,"line":164},[1932,1936,1940,1945],{"type":993,"tag":1027,"props":1933,"children":1934},{"style":1068},[1935],{"type":999,"value":1797},{"type":993,"tag":1027,"props":1937,"children":1938},{"style":1054},[1939],{"type":999,"value":1640},{"type":993,"tag":1027,"props":1941,"children":1942},{"style":1042},[1943],{"type":999,"value":1944},"-=",{"type":993,"tag":1027,"props":1946,"children":1947},{"style":1054},[1948],{"type":999,"value":1810},{"type":993,"tag":1027,"props":1950,"children":1951},{"class":1029,"line":173},[1952,1957,1961],{"type":993,"tag":1027,"props":1953,"children":1954},{"style":1054},[1955],{"type":999,"value":1956},"            other_account.balance ",{"type":993,"tag":1027,"props":1958,"children":1959},{"style":1042},[1960],{"type":999,"value":1140},{"type":993,"tag":1027,"props":1962,"children":1963},{"style":1054},[1964],{"type":999,"value":1810},{"type":993,"tag":1027,"props":1966,"children":1967},{"class":1029,"line":182},[1968,1972,1976,1981,1985,1989,1993,1998,2002,2007,2011],{"type":993,"tag":1027,"props":1969,"children":1970},{"style":1042},[1971],{"type":999,"value":1818},{"type":993,"tag":1027,"props":1973,"children":1974},{"style":1042},[1975],{"type":999,"value":1690},{"type":993,"tag":1027,"props":1977,"children":1978},{"style":1273},[1979],{"type":999,"value":1980},"\"Transferred $",{"type":993,"tag":1027,"props":1982,"children":1983},{"style":1068},[1984],{"type":999,"value":1832},{"type":993,"tag":1027,"props":1986,"children":1987},{"style":1054},[1988],{"type":999,"value":1837},{"type":993,"tag":1027,"props":1990,"children":1991},{"style":1068},[1992],{"type":999,"value":1710},{"type":993,"tag":1027,"props":1994,"children":1995},{"style":1273},[1996],{"type":999,"value":1997}," to ",{"type":993,"tag":1027,"props":1999,"children":2000},{"style":1068},[2001],{"type":999,"value":1832},{"type":993,"tag":1027,"props":2003,"children":2004},{"style":1054},[2005],{"type":999,"value":2006},"other_account.owner",{"type":993,"tag":1027,"props":2008,"children":2009},{"style":1068},[2010],{"type":999,"value":1710},{"type":993,"tag":1027,"props":2012,"children":2013},{"style":1273},[2014],{"type":999,"value":1733},{"type":993,"tag":1027,"props":2016,"children":2017},{"class":1029,"line":191},[2018,2022],{"type":993,"tag":1027,"props":2019,"children":2020},{"style":1042},[2021],{"type":999,"value":1153},{"type":993,"tag":1027,"props":2023,"children":2024},{"style":1273},[2025],{"type":999,"value":2026}," \"Insufficient funds\"\n",{"type":993,"tag":1027,"props":2028,"children":2029},{"class":1029,"line":201},[2030],{"type":993,"tag":1027,"props":2031,"children":2032},{"emptyLinePlaceholder":13},[2033],{"type":999,"value":1284},{"type":993,"tag":1027,"props":2035,"children":2036},{"class":1029,"line":210},[2037],{"type":993,"tag":1027,"props":2038,"children":2039},{"style":1033},[2040],{"type":999,"value":2041},"# Using methods\n",{"type":993,"tag":1027,"props":2043,"children":2044},{"class":1029,"line":219},[2045,2050,2054,2059,2064,2068,2073],{"type":993,"tag":1027,"props":2046,"children":2047},{"style":1054},[2048],{"type":999,"value":2049},"alice_account ",{"type":993,"tag":1027,"props":2051,"children":2052},{"style":1042},[2053],{"type":999,"value":1094},{"type":993,"tag":1027,"props":2055,"children":2056},{"style":1054},[2057],{"type":999,"value":2058}," BankAccount(",{"type":993,"tag":1027,"props":2060,"children":2061},{"style":1273},[2062],{"type":999,"value":2063},"\"Alice\"",{"type":993,"tag":1027,"props":2065,"children":2066},{"style":1054},[2067],{"type":999,"value":1488},{"type":993,"tag":1027,"props":2069,"children":2070},{"style":1068},[2071],{"type":999,"value":2072},"100",{"type":993,"tag":1027,"props":2074,"children":2075},{"style":1054},[2076],{"type":999,"value":2077},")\n",{"type":993,"tag":1027,"props":2079,"children":2080},{"class":1029,"line":228},[2081,2086,2090,2094,2099,2103,2108],{"type":993,"tag":1027,"props":2082,"children":2083},{"style":1054},[2084],{"type":999,"value":2085},"bob_account ",{"type":993,"tag":1027,"props":2087,"children":2088},{"style":1042},[2089],{"type":999,"value":1094},{"type":993,"tag":1027,"props":2091,"children":2092},{"style":1054},[2093],{"type":999,"value":2058},{"type":993,"tag":1027,"props":2095,"children":2096},{"style":1273},[2097],{"type":999,"value":2098},"\"Bob\"",{"type":993,"tag":1027,"props":2100,"children":2101},{"style":1054},[2102],{"type":999,"value":1488},{"type":993,"tag":1027,"props":2104,"children":2105},{"style":1068},[2106],{"type":999,"value":2107},"50",{"type":993,"tag":1027,"props":2109,"children":2110},{"style":1054},[2111],{"type":999,"value":2077},{"type":993,"tag":1027,"props":2113,"children":2114},{"class":1029,"line":238},[2115],{"type":993,"tag":1027,"props":2116,"children":2117},{"emptyLinePlaceholder":13},[2118],{"type":999,"value":1284},{"type":993,"tag":1027,"props":2120,"children":2121},{"class":1029,"line":247},[2122,2126,2131,2136],{"type":993,"tag":1027,"props":2123,"children":2124},{"style":1068},[2125],{"type":999,"value":1309},{"type":993,"tag":1027,"props":2127,"children":2128},{"style":1054},[2129],{"type":999,"value":2130},"(alice_account.deposit(",{"type":993,"tag":1027,"props":2132,"children":2133},{"style":1068},[2134],{"type":999,"value":2135},"25",{"type":993,"tag":1027,"props":2137,"children":2138},{"style":1054},[2139],{"type":999,"value":2140},"))\n",{"type":993,"tag":1027,"props":2142,"children":2143},{"class":1029,"line":256},[2144,2148,2153,2158],{"type":993,"tag":1027,"props":2145,"children":2146},{"style":1068},[2147],{"type":999,"value":1309},{"type":993,"tag":1027,"props":2149,"children":2150},{"style":1054},[2151],{"type":999,"value":2152},"(alice_account.transfer(bob_account, ",{"type":993,"tag":1027,"props":2154,"children":2155},{"style":1068},[2156],{"type":999,"value":2157},"30",{"type":993,"tag":1027,"props":2159,"children":2160},{"style":1054},[2161],{"type":999,"value":2140},{"type":993,"tag":1027,"props":2163,"children":2164},{"class":1029,"line":265},[2165,2169],{"type":993,"tag":1027,"props":2166,"children":2167},{"style":1068},[2168],{"type":999,"value":1309},{"type":993,"tag":1027,"props":2170,"children":2171},{"style":1054},[2172],{"type":999,"value":2173},"(bob_account.get_balance())\n",{"type":993,"tag":1534,"props":2175,"children":2177},{"id":2176},"the-self-parameter",[2178],{"type":999,"value":2179},"The Self Parameter",{"type":993,"tag":1002,"props":2181,"children":2182},{},[2183,2185,2190],{"type":999,"value":2184},"The ",{"type":993,"tag":1023,"props":2186,"children":2188},{"className":2187},[],[2189],{"type":999,"value":1391},{"type":999,"value":2191}," parameter is Python's way of giving methods access to the object they belong to. When you call a method, Python automatically passes the object as the first argument.",{"type":993,"tag":1013,"props":2193,"children":2194},{},[2195],{"type":993,"tag":1017,"props":2196,"children":2198},{"className":1019,"code":2197,"language":6,"meta":8,"style":8},"class Student:\n    def __init__(self, name, grade):\n        self.name = name\n        self.grade = grade\n        self.courses = []\n    \n    def add_course(self, course):\n        # self refers to the specific student object\n        self.courses.append(course)\n        return f\"{self.name} enrolled in {course}\"\n    \n    def get_info(self):\n        # self allows access to all object attributes\n        course_list = \", \".join(self.courses) if self.courses else \"None\"\n        return f\"Student: {self.name}, Grade: {self.grade}, Courses: {course_list}\"\n\n# Each object gets its own 'self'\nstudent1 = Student(\"Alice\", \"A\")\nstudent2 = Student(\"Bob\", \"B\")\n\nprint(student1.add_course(\"Math\"))     # self = student1\nprint(student2.add_course(\"Science\"))  # self = student2\nprint(student1.get_info())             # self = student1\n",[2199],{"type":993,"tag":1023,"props":2200,"children":2201},{"__ignoreMap":8},[2202,2218,2234,2255,2276,2297,2304,2321,2329,2341,2391,2398,2414,2422,2476,2544,2551,2559,2593,2626,2633,2660,2687],{"type":993,"tag":1027,"props":2203,"children":2204},{"class":1029,"line":12},[2205,2209,2214],{"type":993,"tag":1027,"props":2206,"children":2207},{"style":1042},[2208],{"type":999,"value":1045},{"type":993,"tag":1027,"props":2210,"children":2211},{"style":1048},[2212],{"type":999,"value":2213}," Student",{"type":993,"tag":1027,"props":2215,"children":2216},{"style":1054},[2217],{"type":999,"value":1057},{"type":993,"tag":1027,"props":2219,"children":2220},{"class":1029,"line":27},[2221,2225,2229],{"type":993,"tag":1027,"props":2222,"children":2223},{"style":1042},[2224],{"type":999,"value":1065},{"type":993,"tag":1027,"props":2226,"children":2227},{"style":1068},[2228],{"type":999,"value":1071},{"type":993,"tag":1027,"props":2230,"children":2231},{"style":1054},[2232],{"type":999,"value":2233},"(self, name, grade):\n",{"type":993,"tag":1027,"props":2235,"children":2236},{"class":1029,"line":36},[2237,2241,2246,2250],{"type":993,"tag":1027,"props":2238,"children":2239},{"style":1068},[2240],{"type":999,"value":1084},{"type":993,"tag":1027,"props":2242,"children":2243},{"style":1054},[2244],{"type":999,"value":2245},".name ",{"type":993,"tag":1027,"props":2247,"children":2248},{"style":1042},[2249],{"type":999,"value":1094},{"type":993,"tag":1027,"props":2251,"children":2252},{"style":1054},[2253],{"type":999,"value":2254}," name\n",{"type":993,"tag":1027,"props":2256,"children":2257},{"class":1029,"line":45},[2258,2262,2267,2271],{"type":993,"tag":1027,"props":2259,"children":2260},{"style":1068},[2261],{"type":999,"value":1084},{"type":993,"tag":1027,"props":2263,"children":2264},{"style":1054},[2265],{"type":999,"value":2266},".grade ",{"type":993,"tag":1027,"props":2268,"children":2269},{"style":1042},[2270],{"type":999,"value":1094},{"type":993,"tag":1027,"props":2272,"children":2273},{"style":1054},[2274],{"type":999,"value":2275}," grade\n",{"type":993,"tag":1027,"props":2277,"children":2278},{"class":1029,"line":54},[2279,2283,2288,2292],{"type":993,"tag":1027,"props":2280,"children":2281},{"style":1068},[2282],{"type":999,"value":1084},{"type":993,"tag":1027,"props":2284,"children":2285},{"style":1054},[2286],{"type":999,"value":2287},".courses ",{"type":993,"tag":1027,"props":2289,"children":2290},{"style":1042},[2291],{"type":999,"value":1094},{"type":993,"tag":1027,"props":2293,"children":2294},{"style":1054},[2295],{"type":999,"value":2296}," []\n",{"type":993,"tag":1027,"props":2298,"children":2299},{"class":1029,"line":63},[2300],{"type":993,"tag":1027,"props":2301,"children":2302},{"style":1054},[2303],{"type":999,"value":1107},{"type":993,"tag":1027,"props":2305,"children":2306},{"class":1029,"line":72},[2307,2311,2316],{"type":993,"tag":1027,"props":2308,"children":2309},{"style":1042},[2310],{"type":999,"value":1065},{"type":993,"tag":1027,"props":2312,"children":2313},{"style":1048},[2314],{"type":999,"value":2315}," add_course",{"type":993,"tag":1027,"props":2317,"children":2318},{"style":1054},[2319],{"type":999,"value":2320},"(self, course):\n",{"type":993,"tag":1027,"props":2322,"children":2323},{"class":1029,"line":81},[2324],{"type":993,"tag":1027,"props":2325,"children":2326},{"style":1033},[2327],{"type":999,"value":2328},"        # self refers to the specific student object\n",{"type":993,"tag":1027,"props":2330,"children":2331},{"class":1029,"line":91},[2332,2336],{"type":993,"tag":1027,"props":2333,"children":2334},{"style":1068},[2335],{"type":999,"value":1084},{"type":993,"tag":1027,"props":2337,"children":2338},{"style":1054},[2339],{"type":999,"value":2340},".courses.append(course)\n",{"type":993,"tag":1027,"props":2342,"children":2343},{"class":1029,"line":100},[2344,2348,2352,2356,2360,2365,2369,2374,2378,2383,2387],{"type":993,"tag":1027,"props":2345,"children":2346},{"style":1042},[2347],{"type":999,"value":1153},{"type":993,"tag":1027,"props":2349,"children":2350},{"style":1042},[2351],{"type":999,"value":1690},{"type":993,"tag":1027,"props":2353,"children":2354},{"style":1273},[2355],{"type":999,"value":1695},{"type":993,"tag":1027,"props":2357,"children":2358},{"style":1068},[2359],{"type":999,"value":1700},{"type":993,"tag":1027,"props":2361,"children":2362},{"style":1054},[2363],{"type":999,"value":2364},".name",{"type":993,"tag":1027,"props":2366,"children":2367},{"style":1068},[2368],{"type":999,"value":1710},{"type":993,"tag":1027,"props":2370,"children":2371},{"style":1273},[2372],{"type":999,"value":2373}," enrolled in ",{"type":993,"tag":1027,"props":2375,"children":2376},{"style":1068},[2377],{"type":999,"value":1832},{"type":993,"tag":1027,"props":2379,"children":2380},{"style":1054},[2381],{"type":999,"value":2382},"course",{"type":993,"tag":1027,"props":2384,"children":2385},{"style":1068},[2386],{"type":999,"value":1710},{"type":993,"tag":1027,"props":2388,"children":2389},{"style":1273},[2390],{"type":999,"value":1733},{"type":993,"tag":1027,"props":2392,"children":2393},{"class":1029,"line":109},[2394],{"type":993,"tag":1027,"props":2395,"children":2396},{"style":1054},[2397],{"type":999,"value":1107},{"type":993,"tag":1027,"props":2399,"children":2400},{"class":1029,"line":118},[2401,2405,2410],{"type":993,"tag":1027,"props":2402,"children":2403},{"style":1042},[2404],{"type":999,"value":1065},{"type":993,"tag":1027,"props":2406,"children":2407},{"style":1048},[2408],{"type":999,"value":2409}," get_info",{"type":993,"tag":1027,"props":2411,"children":2412},{"style":1054},[2413],{"type":999,"value":1076},{"type":993,"tag":1027,"props":2415,"children":2416},{"class":1029,"line":127},[2417],{"type":993,"tag":1027,"props":2418,"children":2419},{"style":1033},[2420],{"type":999,"value":2421},"        # self allows access to all object attributes\n",{"type":993,"tag":1027,"props":2423,"children":2424},{"class":1029,"line":136},[2425,2430,2434,2439,2444,2448,2453,2458,2462,2466,2471],{"type":993,"tag":1027,"props":2426,"children":2427},{"style":1054},[2428],{"type":999,"value":2429},"        course_list ",{"type":993,"tag":1027,"props":2431,"children":2432},{"style":1042},[2433],{"type":999,"value":1094},{"type":993,"tag":1027,"props":2435,"children":2436},{"style":1273},[2437],{"type":999,"value":2438}," \", \"",{"type":993,"tag":1027,"props":2440,"children":2441},{"style":1054},[2442],{"type":999,"value":2443},".join(",{"type":993,"tag":1027,"props":2445,"children":2446},{"style":1068},[2447],{"type":999,"value":1391},{"type":993,"tag":1027,"props":2449,"children":2450},{"style":1054},[2451],{"type":999,"value":2452},".courses) ",{"type":993,"tag":1027,"props":2454,"children":2455},{"style":1042},[2456],{"type":999,"value":2457},"if",{"type":993,"tag":1027,"props":2459,"children":2460},{"style":1068},[2461],{"type":999,"value":1158},{"type":993,"tag":1027,"props":2463,"children":2464},{"style":1054},[2465],{"type":999,"value":2287},{"type":993,"tag":1027,"props":2467,"children":2468},{"style":1042},[2469],{"type":999,"value":2470},"else",{"type":993,"tag":1027,"props":2472,"children":2473},{"style":1273},[2474],{"type":999,"value":2475}," \"None\"\n",{"type":993,"tag":1027,"props":2477,"children":2478},{"class":1029,"line":146},[2479,2483,2487,2492,2496,2500,2504,2509,2513,2518,2522,2527,2531,2536,2540],{"type":993,"tag":1027,"props":2480,"children":2481},{"style":1042},[2482],{"type":999,"value":1153},{"type":993,"tag":1027,"props":2484,"children":2485},{"style":1042},[2486],{"type":999,"value":1690},{"type":993,"tag":1027,"props":2488,"children":2489},{"style":1273},[2490],{"type":999,"value":2491},"\"Student: ",{"type":993,"tag":1027,"props":2493,"children":2494},{"style":1068},[2495],{"type":999,"value":1700},{"type":993,"tag":1027,"props":2497,"children":2498},{"style":1054},[2499],{"type":999,"value":2364},{"type":993,"tag":1027,"props":2501,"children":2502},{"style":1068},[2503],{"type":999,"value":1710},{"type":993,"tag":1027,"props":2505,"children":2506},{"style":1273},[2507],{"type":999,"value":2508},", Grade: ",{"type":993,"tag":1027,"props":2510,"children":2511},{"style":1068},[2512],{"type":999,"value":1700},{"type":993,"tag":1027,"props":2514,"children":2515},{"style":1054},[2516],{"type":999,"value":2517},".grade",{"type":993,"tag":1027,"props":2519,"children":2520},{"style":1068},[2521],{"type":999,"value":1710},{"type":993,"tag":1027,"props":2523,"children":2524},{"style":1273},[2525],{"type":999,"value":2526},", Courses: ",{"type":993,"tag":1027,"props":2528,"children":2529},{"style":1068},[2530],{"type":999,"value":1832},{"type":993,"tag":1027,"props":2532,"children":2533},{"style":1054},[2534],{"type":999,"value":2535},"course_list",{"type":993,"tag":1027,"props":2537,"children":2538},{"style":1068},[2539],{"type":999,"value":1710},{"type":993,"tag":1027,"props":2541,"children":2542},{"style":1273},[2543],{"type":999,"value":1733},{"type":993,"tag":1027,"props":2545,"children":2546},{"class":1029,"line":155},[2547],{"type":993,"tag":1027,"props":2548,"children":2549},{"emptyLinePlaceholder":13},[2550],{"type":999,"value":1284},{"type":993,"tag":1027,"props":2552,"children":2553},{"class":1029,"line":164},[2554],{"type":993,"tag":1027,"props":2555,"children":2556},{"style":1033},[2557],{"type":999,"value":2558},"# Each object gets its own 'self'\n",{"type":993,"tag":1027,"props":2560,"children":2561},{"class":1029,"line":173},[2562,2567,2571,2576,2580,2584,2589],{"type":993,"tag":1027,"props":2563,"children":2564},{"style":1054},[2565],{"type":999,"value":2566},"student1 ",{"type":993,"tag":1027,"props":2568,"children":2569},{"style":1042},[2570],{"type":999,"value":1094},{"type":993,"tag":1027,"props":2572,"children":2573},{"style":1054},[2574],{"type":999,"value":2575}," Student(",{"type":993,"tag":1027,"props":2577,"children":2578},{"style":1273},[2579],{"type":999,"value":2063},{"type":993,"tag":1027,"props":2581,"children":2582},{"style":1054},[2583],{"type":999,"value":1488},{"type":993,"tag":1027,"props":2585,"children":2586},{"style":1273},[2587],{"type":999,"value":2588},"\"A\"",{"type":993,"tag":1027,"props":2590,"children":2591},{"style":1054},[2592],{"type":999,"value":2077},{"type":993,"tag":1027,"props":2594,"children":2595},{"class":1029,"line":182},[2596,2601,2605,2609,2613,2617,2622],{"type":993,"tag":1027,"props":2597,"children":2598},{"style":1054},[2599],{"type":999,"value":2600},"student2 ",{"type":993,"tag":1027,"props":2602,"children":2603},{"style":1042},[2604],{"type":999,"value":1094},{"type":993,"tag":1027,"props":2606,"children":2607},{"style":1054},[2608],{"type":999,"value":2575},{"type":993,"tag":1027,"props":2610,"children":2611},{"style":1273},[2612],{"type":999,"value":2098},{"type":993,"tag":1027,"props":2614,"children":2615},{"style":1054},[2616],{"type":999,"value":1488},{"type":993,"tag":1027,"props":2618,"children":2619},{"style":1273},[2620],{"type":999,"value":2621},"\"B\"",{"type":993,"tag":1027,"props":2623,"children":2624},{"style":1054},[2625],{"type":999,"value":2077},{"type":993,"tag":1027,"props":2627,"children":2628},{"class":1029,"line":191},[2629],{"type":993,"tag":1027,"props":2630,"children":2631},{"emptyLinePlaceholder":13},[2632],{"type":999,"value":1284},{"type":993,"tag":1027,"props":2634,"children":2635},{"class":1029,"line":201},[2636,2640,2645,2650,2655],{"type":993,"tag":1027,"props":2637,"children":2638},{"style":1068},[2639],{"type":999,"value":1309},{"type":993,"tag":1027,"props":2641,"children":2642},{"style":1054},[2643],{"type":999,"value":2644},"(student1.add_course(",{"type":993,"tag":1027,"props":2646,"children":2647},{"style":1273},[2648],{"type":999,"value":2649},"\"Math\"",{"type":993,"tag":1027,"props":2651,"children":2652},{"style":1054},[2653],{"type":999,"value":2654},"))     ",{"type":993,"tag":1027,"props":2656,"children":2657},{"style":1033},[2658],{"type":999,"value":2659},"# self = student1\n",{"type":993,"tag":1027,"props":2661,"children":2662},{"class":1029,"line":210},[2663,2667,2672,2677,2682],{"type":993,"tag":1027,"props":2664,"children":2665},{"style":1068},[2666],{"type":999,"value":1309},{"type":993,"tag":1027,"props":2668,"children":2669},{"style":1054},[2670],{"type":999,"value":2671},"(student2.add_course(",{"type":993,"tag":1027,"props":2673,"children":2674},{"style":1273},[2675],{"type":999,"value":2676},"\"Science\"",{"type":993,"tag":1027,"props":2678,"children":2679},{"style":1054},[2680],{"type":999,"value":2681},"))  ",{"type":993,"tag":1027,"props":2683,"children":2684},{"style":1033},[2685],{"type":999,"value":2686},"# self = student2\n",{"type":993,"tag":1027,"props":2688,"children":2689},{"class":1029,"line":219},[2690,2694,2699],{"type":993,"tag":1027,"props":2691,"children":2692},{"style":1068},[2693],{"type":999,"value":1309},{"type":993,"tag":1027,"props":2695,"children":2696},{"style":1054},[2697],{"type":999,"value":2698},"(student1.get_info())             ",{"type":993,"tag":1027,"props":2700,"children":2701},{"style":1033},[2702],{"type":999,"value":2659},{"type":993,"tag":1375,"props":2704,"children":2706},{"id":2705},"method-parameters-and-return-values",[2707],{"type":999,"value":2708},"⚡ Method Parameters and Return Values",{"type":993,"tag":1002,"props":2710,"children":2711},{},[2712],{"type":999,"value":2713},"Methods can accept parameters just like regular functions, and they can return values to provide feedback or computed results. This flexibility allows methods to be interactive and responsive to different inputs.",{"type":993,"tag":1534,"props":2715,"children":2717},{"id":2716},"methods-with-parameters",[2718],{"type":999,"value":2719},"Methods with Parameters",{"type":993,"tag":1002,"props":2721,"children":2722},{},[2723],{"type":999,"value":2724},"Parameters allow methods to receive external data and modify their behavior accordingly.",{"type":993,"tag":1013,"props":2726,"children":2727},{},[2728],{"type":993,"tag":1017,"props":2729,"children":2731},{"className":1019,"code":2730,"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 resize(self, new_width, new_height):\n        old_area = self.width * self.height\n        self.width = new_width\n        self.height = new_height\n        new_area = self.width * self.height\n        return f\"Resized from {old_area} to {new_area} square units\"\n    \n    def scale(self, factor):\n        self.width *= factor\n        self.height *= factor\n        return f\"Scaled by {factor}x. New size: {self.width}x{self.height}\"\n    \n    def is_larger_than(self, other_rectangle):\n        my_area = self.width * self.height\n        other_area = other_rectangle.width * other_rectangle.height\n        return my_area > other_area\n\nrect1 = Rectangle(4, 3)\nrect2 = Rectangle(5, 2)\n\nprint(rect1.resize(6, 4))\nprint(rect1.scale(2))\nprint(rect1.is_larger_than(rect2))\n",[2732],{"type":993,"tag":1023,"props":2733,"children":2734},{"__ignoreMap":8},[2735,2751,2767,2788,2809,2816,2833,2867,2887,2907,2939,2990,2997,3014,3034,3053,3122,3129,3146,3178,3204,3225,3232,3266,3299,3306,3335,3355],{"type":993,"tag":1027,"props":2736,"children":2737},{"class":1029,"line":12},[2738,2742,2747],{"type":993,"tag":1027,"props":2739,"children":2740},{"style":1042},[2741],{"type":999,"value":1045},{"type":993,"tag":1027,"props":2743,"children":2744},{"style":1048},[2745],{"type":999,"value":2746}," Rectangle",{"type":993,"tag":1027,"props":2748,"children":2749},{"style":1054},[2750],{"type":999,"value":1057},{"type":993,"tag":1027,"props":2752,"children":2753},{"class":1029,"line":27},[2754,2758,2762],{"type":993,"tag":1027,"props":2755,"children":2756},{"style":1042},[2757],{"type":999,"value":1065},{"type":993,"tag":1027,"props":2759,"children":2760},{"style":1068},[2761],{"type":999,"value":1071},{"type":993,"tag":1027,"props":2763,"children":2764},{"style":1054},[2765],{"type":999,"value":2766},"(self, width, height):\n",{"type":993,"tag":1027,"props":2768,"children":2769},{"class":1029,"line":36},[2770,2774,2779,2783],{"type":993,"tag":1027,"props":2771,"children":2772},{"style":1068},[2773],{"type":999,"value":1084},{"type":993,"tag":1027,"props":2775,"children":2776},{"style":1054},[2777],{"type":999,"value":2778},".width ",{"type":993,"tag":1027,"props":2780,"children":2781},{"style":1042},[2782],{"type":999,"value":1094},{"type":993,"tag":1027,"props":2784,"children":2785},{"style":1054},[2786],{"type":999,"value":2787}," width\n",{"type":993,"tag":1027,"props":2789,"children":2790},{"class":1029,"line":45},[2791,2795,2800,2804],{"type":993,"tag":1027,"props":2792,"children":2793},{"style":1068},[2794],{"type":999,"value":1084},{"type":993,"tag":1027,"props":2796,"children":2797},{"style":1054},[2798],{"type":999,"value":2799},".height ",{"type":993,"tag":1027,"props":2801,"children":2802},{"style":1042},[2803],{"type":999,"value":1094},{"type":993,"tag":1027,"props":2805,"children":2806},{"style":1054},[2807],{"type":999,"value":2808}," height\n",{"type":993,"tag":1027,"props":2810,"children":2811},{"class":1029,"line":54},[2812],{"type":993,"tag":1027,"props":2813,"children":2814},{"style":1054},[2815],{"type":999,"value":1107},{"type":993,"tag":1027,"props":2817,"children":2818},{"class":1029,"line":63},[2819,2823,2828],{"type":993,"tag":1027,"props":2820,"children":2821},{"style":1042},[2822],{"type":999,"value":1065},{"type":993,"tag":1027,"props":2824,"children":2825},{"style":1048},[2826],{"type":999,"value":2827}," resize",{"type":993,"tag":1027,"props":2829,"children":2830},{"style":1054},[2831],{"type":999,"value":2832},"(self, new_width, new_height):\n",{"type":993,"tag":1027,"props":2834,"children":2835},{"class":1029,"line":72},[2836,2841,2845,2849,2853,2858,2862],{"type":993,"tag":1027,"props":2837,"children":2838},{"style":1054},[2839],{"type":999,"value":2840},"        old_area ",{"type":993,"tag":1027,"props":2842,"children":2843},{"style":1042},[2844],{"type":999,"value":1094},{"type":993,"tag":1027,"props":2846,"children":2847},{"style":1068},[2848],{"type":999,"value":1158},{"type":993,"tag":1027,"props":2850,"children":2851},{"style":1054},[2852],{"type":999,"value":2778},{"type":993,"tag":1027,"props":2854,"children":2855},{"style":1042},[2856],{"type":999,"value":2857},"*",{"type":993,"tag":1027,"props":2859,"children":2860},{"style":1068},[2861],{"type":999,"value":1158},{"type":993,"tag":1027,"props":2863,"children":2864},{"style":1054},[2865],{"type":999,"value":2866},".height\n",{"type":993,"tag":1027,"props":2868,"children":2869},{"class":1029,"line":81},[2870,2874,2878,2882],{"type":993,"tag":1027,"props":2871,"children":2872},{"style":1068},[2873],{"type":999,"value":1084},{"type":993,"tag":1027,"props":2875,"children":2876},{"style":1054},[2877],{"type":999,"value":2778},{"type":993,"tag":1027,"props":2879,"children":2880},{"style":1042},[2881],{"type":999,"value":1094},{"type":993,"tag":1027,"props":2883,"children":2884},{"style":1054},[2885],{"type":999,"value":2886}," new_width\n",{"type":993,"tag":1027,"props":2888,"children":2889},{"class":1029,"line":91},[2890,2894,2898,2902],{"type":993,"tag":1027,"props":2891,"children":2892},{"style":1068},[2893],{"type":999,"value":1084},{"type":993,"tag":1027,"props":2895,"children":2896},{"style":1054},[2897],{"type":999,"value":2799},{"type":993,"tag":1027,"props":2899,"children":2900},{"style":1042},[2901],{"type":999,"value":1094},{"type":993,"tag":1027,"props":2903,"children":2904},{"style":1054},[2905],{"type":999,"value":2906}," new_height\n",{"type":993,"tag":1027,"props":2908,"children":2909},{"class":1029,"line":100},[2910,2915,2919,2923,2927,2931,2935],{"type":993,"tag":1027,"props":2911,"children":2912},{"style":1054},[2913],{"type":999,"value":2914},"        new_area ",{"type":993,"tag":1027,"props":2916,"children":2917},{"style":1042},[2918],{"type":999,"value":1094},{"type":993,"tag":1027,"props":2920,"children":2921},{"style":1068},[2922],{"type":999,"value":1158},{"type":993,"tag":1027,"props":2924,"children":2925},{"style":1054},[2926],{"type":999,"value":2778},{"type":993,"tag":1027,"props":2928,"children":2929},{"style":1042},[2930],{"type":999,"value":2857},{"type":993,"tag":1027,"props":2932,"children":2933},{"style":1068},[2934],{"type":999,"value":1158},{"type":993,"tag":1027,"props":2936,"children":2937},{"style":1054},[2938],{"type":999,"value":2866},{"type":993,"tag":1027,"props":2940,"children":2941},{"class":1029,"line":109},[2942,2946,2950,2955,2959,2964,2968,2972,2976,2981,2985],{"type":993,"tag":1027,"props":2943,"children":2944},{"style":1042},[2945],{"type":999,"value":1153},{"type":993,"tag":1027,"props":2947,"children":2948},{"style":1042},[2949],{"type":999,"value":1690},{"type":993,"tag":1027,"props":2951,"children":2952},{"style":1273},[2953],{"type":999,"value":2954},"\"Resized from ",{"type":993,"tag":1027,"props":2956,"children":2957},{"style":1068},[2958],{"type":999,"value":1832},{"type":993,"tag":1027,"props":2960,"children":2961},{"style":1054},[2962],{"type":999,"value":2963},"old_area",{"type":993,"tag":1027,"props":2965,"children":2966},{"style":1068},[2967],{"type":999,"value":1710},{"type":993,"tag":1027,"props":2969,"children":2970},{"style":1273},[2971],{"type":999,"value":1997},{"type":993,"tag":1027,"props":2973,"children":2974},{"style":1068},[2975],{"type":999,"value":1832},{"type":993,"tag":1027,"props":2977,"children":2978},{"style":1054},[2979],{"type":999,"value":2980},"new_area",{"type":993,"tag":1027,"props":2982,"children":2983},{"style":1068},[2984],{"type":999,"value":1710},{"type":993,"tag":1027,"props":2986,"children":2987},{"style":1273},[2988],{"type":999,"value":2989}," square units\"\n",{"type":993,"tag":1027,"props":2991,"children":2992},{"class":1029,"line":118},[2993],{"type":993,"tag":1027,"props":2994,"children":2995},{"style":1054},[2996],{"type":999,"value":1107},{"type":993,"tag":1027,"props":2998,"children":2999},{"class":1029,"line":127},[3000,3004,3009],{"type":993,"tag":1027,"props":3001,"children":3002},{"style":1042},[3003],{"type":999,"value":1065},{"type":993,"tag":1027,"props":3005,"children":3006},{"style":1048},[3007],{"type":999,"value":3008}," scale",{"type":993,"tag":1027,"props":3010,"children":3011},{"style":1054},[3012],{"type":999,"value":3013},"(self, factor):\n",{"type":993,"tag":1027,"props":3015,"children":3016},{"class":1029,"line":136},[3017,3021,3025,3029],{"type":993,"tag":1027,"props":3018,"children":3019},{"style":1068},[3020],{"type":999,"value":1084},{"type":993,"tag":1027,"props":3022,"children":3023},{"style":1054},[3024],{"type":999,"value":2778},{"type":993,"tag":1027,"props":3026,"children":3027},{"style":1042},[3028],{"type":999,"value":1202},{"type":993,"tag":1027,"props":3030,"children":3031},{"style":1054},[3032],{"type":999,"value":3033}," factor\n",{"type":993,"tag":1027,"props":3035,"children":3036},{"class":1029,"line":146},[3037,3041,3045,3049],{"type":993,"tag":1027,"props":3038,"children":3039},{"style":1068},[3040],{"type":999,"value":1084},{"type":993,"tag":1027,"props":3042,"children":3043},{"style":1054},[3044],{"type":999,"value":2799},{"type":993,"tag":1027,"props":3046,"children":3047},{"style":1042},[3048],{"type":999,"value":1202},{"type":993,"tag":1027,"props":3050,"children":3051},{"style":1054},[3052],{"type":999,"value":3033},{"type":993,"tag":1027,"props":3054,"children":3055},{"class":1029,"line":155},[3056,3060,3064,3069,3073,3078,3082,3087,3091,3096,3100,3105,3109,3114,3118],{"type":993,"tag":1027,"props":3057,"children":3058},{"style":1042},[3059],{"type":999,"value":1153},{"type":993,"tag":1027,"props":3061,"children":3062},{"style":1042},[3063],{"type":999,"value":1690},{"type":993,"tag":1027,"props":3065,"children":3066},{"style":1273},[3067],{"type":999,"value":3068},"\"Scaled by ",{"type":993,"tag":1027,"props":3070,"children":3071},{"style":1068},[3072],{"type":999,"value":1832},{"type":993,"tag":1027,"props":3074,"children":3075},{"style":1054},[3076],{"type":999,"value":3077},"factor",{"type":993,"tag":1027,"props":3079,"children":3080},{"style":1068},[3081],{"type":999,"value":1710},{"type":993,"tag":1027,"props":3083,"children":3084},{"style":1273},[3085],{"type":999,"value":3086},"x. New size: ",{"type":993,"tag":1027,"props":3088,"children":3089},{"style":1068},[3090],{"type":999,"value":1700},{"type":993,"tag":1027,"props":3092,"children":3093},{"style":1054},[3094],{"type":999,"value":3095},".width",{"type":993,"tag":1027,"props":3097,"children":3098},{"style":1068},[3099],{"type":999,"value":1710},{"type":993,"tag":1027,"props":3101,"children":3102},{"style":1273},[3103],{"type":999,"value":3104},"x",{"type":993,"tag":1027,"props":3106,"children":3107},{"style":1068},[3108],{"type":999,"value":1700},{"type":993,"tag":1027,"props":3110,"children":3111},{"style":1054},[3112],{"type":999,"value":3113},".height",{"type":993,"tag":1027,"props":3115,"children":3116},{"style":1068},[3117],{"type":999,"value":1710},{"type":993,"tag":1027,"props":3119,"children":3120},{"style":1273},[3121],{"type":999,"value":1733},{"type":993,"tag":1027,"props":3123,"children":3124},{"class":1029,"line":164},[3125],{"type":993,"tag":1027,"props":3126,"children":3127},{"style":1054},[3128],{"type":999,"value":1107},{"type":993,"tag":1027,"props":3130,"children":3131},{"class":1029,"line":173},[3132,3136,3141],{"type":993,"tag":1027,"props":3133,"children":3134},{"style":1042},[3135],{"type":999,"value":1065},{"type":993,"tag":1027,"props":3137,"children":3138},{"style":1048},[3139],{"type":999,"value":3140}," is_larger_than",{"type":993,"tag":1027,"props":3142,"children":3143},{"style":1054},[3144],{"type":999,"value":3145},"(self, other_rectangle):\n",{"type":993,"tag":1027,"props":3147,"children":3148},{"class":1029,"line":182},[3149,3154,3158,3162,3166,3170,3174],{"type":993,"tag":1027,"props":3150,"children":3151},{"style":1054},[3152],{"type":999,"value":3153},"        my_area ",{"type":993,"tag":1027,"props":3155,"children":3156},{"style":1042},[3157],{"type":999,"value":1094},{"type":993,"tag":1027,"props":3159,"children":3160},{"style":1068},[3161],{"type":999,"value":1158},{"type":993,"tag":1027,"props":3163,"children":3164},{"style":1054},[3165],{"type":999,"value":2778},{"type":993,"tag":1027,"props":3167,"children":3168},{"style":1042},[3169],{"type":999,"value":2857},{"type":993,"tag":1027,"props":3171,"children":3172},{"style":1068},[3173],{"type":999,"value":1158},{"type":993,"tag":1027,"props":3175,"children":3176},{"style":1054},[3177],{"type":999,"value":2866},{"type":993,"tag":1027,"props":3179,"children":3180},{"class":1029,"line":191},[3181,3186,3190,3195,3199],{"type":993,"tag":1027,"props":3182,"children":3183},{"style":1054},[3184],{"type":999,"value":3185},"        other_area ",{"type":993,"tag":1027,"props":3187,"children":3188},{"style":1042},[3189],{"type":999,"value":1094},{"type":993,"tag":1027,"props":3191,"children":3192},{"style":1054},[3193],{"type":999,"value":3194}," other_rectangle.width ",{"type":993,"tag":1027,"props":3196,"children":3197},{"style":1042},[3198],{"type":999,"value":2857},{"type":993,"tag":1027,"props":3200,"children":3201},{"style":1054},[3202],{"type":999,"value":3203}," other_rectangle.height\n",{"type":993,"tag":1027,"props":3205,"children":3206},{"class":1029,"line":201},[3207,3211,3216,3220],{"type":993,"tag":1027,"props":3208,"children":3209},{"style":1042},[3210],{"type":999,"value":1153},{"type":993,"tag":1027,"props":3212,"children":3213},{"style":1054},[3214],{"type":999,"value":3215}," my_area ",{"type":993,"tag":1027,"props":3217,"children":3218},{"style":1042},[3219],{"type":999,"value":1780},{"type":993,"tag":1027,"props":3221,"children":3222},{"style":1054},[3223],{"type":999,"value":3224}," other_area\n",{"type":993,"tag":1027,"props":3226,"children":3227},{"class":1029,"line":210},[3228],{"type":993,"tag":1027,"props":3229,"children":3230},{"emptyLinePlaceholder":13},[3231],{"type":999,"value":1284},{"type":993,"tag":1027,"props":3233,"children":3234},{"class":1029,"line":219},[3235,3240,3244,3249,3254,3258,3262],{"type":993,"tag":1027,"props":3236,"children":3237},{"style":1054},[3238],{"type":999,"value":3239},"rect1 ",{"type":993,"tag":1027,"props":3241,"children":3242},{"style":1042},[3243],{"type":999,"value":1094},{"type":993,"tag":1027,"props":3245,"children":3246},{"style":1054},[3247],{"type":999,"value":3248}," Rectangle(",{"type":993,"tag":1027,"props":3250,"children":3251},{"style":1068},[3252],{"type":999,"value":3253},"4",{"type":993,"tag":1027,"props":3255,"children":3256},{"style":1054},[3257],{"type":999,"value":1488},{"type":993,"tag":1027,"props":3259,"children":3260},{"style":1068},[3261],{"type":999,"value":1346},{"type":993,"tag":1027,"props":3263,"children":3264},{"style":1054},[3265],{"type":999,"value":2077},{"type":993,"tag":1027,"props":3267,"children":3268},{"class":1029,"line":228},[3269,3274,3278,3282,3286,3290,3295],{"type":993,"tag":1027,"props":3270,"children":3271},{"style":1054},[3272],{"type":999,"value":3273},"rect2 ",{"type":993,"tag":1027,"props":3275,"children":3276},{"style":1042},[3277],{"type":999,"value":1094},{"type":993,"tag":1027,"props":3279,"children":3280},{"style":1054},[3281],{"type":999,"value":3248},{"type":993,"tag":1027,"props":3283,"children":3284},{"style":1068},[3285],{"type":999,"value":1319},{"type":993,"tag":1027,"props":3287,"children":3288},{"style":1054},[3289],{"type":999,"value":1488},{"type":993,"tag":1027,"props":3291,"children":3292},{"style":1068},[3293],{"type":999,"value":3294},"2",{"type":993,"tag":1027,"props":3296,"children":3297},{"style":1054},[3298],{"type":999,"value":2077},{"type":993,"tag":1027,"props":3300,"children":3301},{"class":1029,"line":238},[3302],{"type":993,"tag":1027,"props":3303,"children":3304},{"emptyLinePlaceholder":13},[3305],{"type":999,"value":1284},{"type":993,"tag":1027,"props":3307,"children":3308},{"class":1029,"line":247},[3309,3313,3318,3323,3327,3331],{"type":993,"tag":1027,"props":3310,"children":3311},{"style":1068},[3312],{"type":999,"value":1309},{"type":993,"tag":1027,"props":3314,"children":3315},{"style":1054},[3316],{"type":999,"value":3317},"(rect1.resize(",{"type":993,"tag":1027,"props":3319,"children":3320},{"style":1068},[3321],{"type":999,"value":3322},"6",{"type":993,"tag":1027,"props":3324,"children":3325},{"style":1054},[3326],{"type":999,"value":1488},{"type":993,"tag":1027,"props":3328,"children":3329},{"style":1068},[3330],{"type":999,"value":3253},{"type":993,"tag":1027,"props":3332,"children":3333},{"style":1054},[3334],{"type":999,"value":2140},{"type":993,"tag":1027,"props":3336,"children":3337},{"class":1029,"line":256},[3338,3342,3347,3351],{"type":993,"tag":1027,"props":3339,"children":3340},{"style":1068},[3341],{"type":999,"value":1309},{"type":993,"tag":1027,"props":3343,"children":3344},{"style":1054},[3345],{"type":999,"value":3346},"(rect1.scale(",{"type":993,"tag":1027,"props":3348,"children":3349},{"style":1068},[3350],{"type":999,"value":3294},{"type":993,"tag":1027,"props":3352,"children":3353},{"style":1054},[3354],{"type":999,"value":2140},{"type":993,"tag":1027,"props":3356,"children":3357},{"class":1029,"line":265},[3358,3362],{"type":993,"tag":1027,"props":3359,"children":3360},{"style":1068},[3361],{"type":999,"value":1309},{"type":993,"tag":1027,"props":3363,"children":3364},{"style":1054},[3365],{"type":999,"value":3366},"(rect1.is_larger_than(rect2))\n",{"type":993,"tag":1534,"props":3368,"children":3370},{"id":3369},"methods-with-return-values",[3371],{"type":999,"value":3372},"Methods with Return Values",{"type":993,"tag":1002,"props":3374,"children":3375},{},[3376],{"type":999,"value":3377},"Return values allow methods to provide feedback, computed results, or status information.",{"type":993,"tag":1013,"props":3379,"children":3380},{},[3381],{"type":993,"tag":1017,"props":3382,"children":3384},{"className":1019,"code":3383,"language":6,"meta":8,"style":8},"class ShoppingCart:\n    def __init__(self):\n        self.items = {}\n    \n    def add_item(self, item, price, quantity=1):\n        if item in self.items:\n            self.items[item]['quantity'] += quantity\n        else:\n            self.items[item] = {'price': price, 'quantity': quantity}\n        return f\"Added {quantity} {item}(s) to cart\"\n    \n    def get_total(self):\n        total = 0\n        for item_data in self.items.values():\n            total += item_data['price'] * item_data['quantity']\n        return total\n    \n    def get_summary(self):\n        if not self.items:\n            return \"Cart is empty\"\n        \n        summary = []\n        for item, data in self.items.items():\n            line = f\"{item}: ${data['price']} x {data['quantity']}\"\n            summary.append(line)\n        \n        return {\n            'items': summary,\n            'total': self.get_total(),\n            'item_count': len(self.items)\n        }\n\ncart = ShoppingCart()\ncart.add_item(\"Apple\", 1.50, 3)\ncart.add_item(\"Bread\", 2.99)\n\nprint(f\"Total: ${cart.get_total()}\")\nsummary = cart.get_summary()\nfor item in summary['items']:\n    print(item)\n",[3385],{"type":993,"tag":1023,"props":3386,"children":3387},{"__ignoreMap":8},[3388,3404,3419,3440,3447,3477,3503,3534,3546,3586,3633,3640,3656,3672,3698,3740,3752,3759,3775,3795,3807,3815,3831,3856,3944,3952,3959,3971,3984,4006,4037,4045,4052,4069,4103,4128,4135,4177,4194,4225],{"type":993,"tag":1027,"props":3389,"children":3390},{"class":1029,"line":12},[3391,3395,3400],{"type":993,"tag":1027,"props":3392,"children":3393},{"style":1042},[3394],{"type":999,"value":1045},{"type":993,"tag":1027,"props":3396,"children":3397},{"style":1048},[3398],{"type":999,"value":3399}," ShoppingCart",{"type":993,"tag":1027,"props":3401,"children":3402},{"style":1054},[3403],{"type":999,"value":1057},{"type":993,"tag":1027,"props":3405,"children":3406},{"class":1029,"line":27},[3407,3411,3415],{"type":993,"tag":1027,"props":3408,"children":3409},{"style":1042},[3410],{"type":999,"value":1065},{"type":993,"tag":1027,"props":3412,"children":3413},{"style":1068},[3414],{"type":999,"value":1071},{"type":993,"tag":1027,"props":3416,"children":3417},{"style":1054},[3418],{"type":999,"value":1076},{"type":993,"tag":1027,"props":3420,"children":3421},{"class":1029,"line":36},[3422,3426,3431,3435],{"type":993,"tag":1027,"props":3423,"children":3424},{"style":1068},[3425],{"type":999,"value":1084},{"type":993,"tag":1027,"props":3427,"children":3428},{"style":1054},[3429],{"type":999,"value":3430},".items ",{"type":993,"tag":1027,"props":3432,"children":3433},{"style":1042},[3434],{"type":999,"value":1094},{"type":993,"tag":1027,"props":3436,"children":3437},{"style":1054},[3438],{"type":999,"value":3439}," {}\n",{"type":993,"tag":1027,"props":3441,"children":3442},{"class":1029,"line":45},[3443],{"type":993,"tag":1027,"props":3444,"children":3445},{"style":1054},[3446],{"type":999,"value":1107},{"type":993,"tag":1027,"props":3448,"children":3449},{"class":1029,"line":54},[3450,3454,3459,3464,3468,3473],{"type":993,"tag":1027,"props":3451,"children":3452},{"style":1042},[3453],{"type":999,"value":1065},{"type":993,"tag":1027,"props":3455,"children":3456},{"style":1048},[3457],{"type":999,"value":3458}," add_item",{"type":993,"tag":1027,"props":3460,"children":3461},{"style":1054},[3462],{"type":999,"value":3463},"(self, item, price, quantity",{"type":993,"tag":1027,"props":3465,"children":3466},{"style":1042},[3467],{"type":999,"value":1094},{"type":993,"tag":1027,"props":3469,"children":3470},{"style":1068},[3471],{"type":999,"value":3472},"1",{"type":993,"tag":1027,"props":3474,"children":3475},{"style":1054},[3476],{"type":999,"value":1607},{"type":993,"tag":1027,"props":3478,"children":3479},{"class":1029,"line":63},[3480,3484,3489,3494,3498],{"type":993,"tag":1027,"props":3481,"children":3482},{"style":1042},[3483],{"type":999,"value":1770},{"type":993,"tag":1027,"props":3485,"children":3486},{"style":1054},[3487],{"type":999,"value":3488}," item ",{"type":993,"tag":1027,"props":3490,"children":3491},{"style":1042},[3492],{"type":999,"value":3493},"in",{"type":993,"tag":1027,"props":3495,"children":3496},{"style":1068},[3497],{"type":999,"value":1158},{"type":993,"tag":1027,"props":3499,"children":3500},{"style":1054},[3501],{"type":999,"value":3502},".items:\n",{"type":993,"tag":1027,"props":3504,"children":3505},{"class":1029,"line":72},[3506,3510,3515,3520,3525,3529],{"type":993,"tag":1027,"props":3507,"children":3508},{"style":1068},[3509],{"type":999,"value":1797},{"type":993,"tag":1027,"props":3511,"children":3512},{"style":1054},[3513],{"type":999,"value":3514},".items[item][",{"type":993,"tag":1027,"props":3516,"children":3517},{"style":1273},[3518],{"type":999,"value":3519},"'quantity'",{"type":993,"tag":1027,"props":3521,"children":3522},{"style":1054},[3523],{"type":999,"value":3524},"] ",{"type":993,"tag":1027,"props":3526,"children":3527},{"style":1042},[3528],{"type":999,"value":1140},{"type":993,"tag":1027,"props":3530,"children":3531},{"style":1054},[3532],{"type":999,"value":3533}," quantity\n",{"type":993,"tag":1027,"props":3535,"children":3536},{"class":1029,"line":81},[3537,3542],{"type":993,"tag":1027,"props":3538,"children":3539},{"style":1042},[3540],{"type":999,"value":3541},"        else",{"type":993,"tag":1027,"props":3543,"children":3544},{"style":1054},[3545],{"type":999,"value":1057},{"type":993,"tag":1027,"props":3547,"children":3548},{"class":1029,"line":91},[3549,3553,3558,3562,3567,3572,3577,3581],{"type":993,"tag":1027,"props":3550,"children":3551},{"style":1068},[3552],{"type":999,"value":1797},{"type":993,"tag":1027,"props":3554,"children":3555},{"style":1054},[3556],{"type":999,"value":3557},".items[item] ",{"type":993,"tag":1027,"props":3559,"children":3560},{"style":1042},[3561],{"type":999,"value":1094},{"type":993,"tag":1027,"props":3563,"children":3564},{"style":1054},[3565],{"type":999,"value":3566}," {",{"type":993,"tag":1027,"props":3568,"children":3569},{"style":1273},[3570],{"type":999,"value":3571},"'price'",{"type":993,"tag":1027,"props":3573,"children":3574},{"style":1054},[3575],{"type":999,"value":3576},": price, ",{"type":993,"tag":1027,"props":3578,"children":3579},{"style":1273},[3580],{"type":999,"value":3519},{"type":993,"tag":1027,"props":3582,"children":3583},{"style":1054},[3584],{"type":999,"value":3585},": quantity}\n",{"type":993,"tag":1027,"props":3587,"children":3588},{"class":1029,"line":100},[3589,3593,3597,3602,3606,3611,3615,3619,3624,3628],{"type":993,"tag":1027,"props":3590,"children":3591},{"style":1042},[3592],{"type":999,"value":1153},{"type":993,"tag":1027,"props":3594,"children":3595},{"style":1042},[3596],{"type":999,"value":1690},{"type":993,"tag":1027,"props":3598,"children":3599},{"style":1273},[3600],{"type":999,"value":3601},"\"Added ",{"type":993,"tag":1027,"props":3603,"children":3604},{"style":1068},[3605],{"type":999,"value":1832},{"type":993,"tag":1027,"props":3607,"children":3608},{"style":1054},[3609],{"type":999,"value":3610},"quantity",{"type":993,"tag":1027,"props":3612,"children":3613},{"style":1068},[3614],{"type":999,"value":1710},{"type":993,"tag":1027,"props":3616,"children":3617},{"style":1068},[3618],{"type":999,"value":3566},{"type":993,"tag":1027,"props":3620,"children":3621},{"style":1054},[3622],{"type":999,"value":3623},"item",{"type":993,"tag":1027,"props":3625,"children":3626},{"style":1068},[3627],{"type":999,"value":1710},{"type":993,"tag":1027,"props":3629,"children":3630},{"style":1273},[3631],{"type":999,"value":3632},"(s) to cart\"\n",{"type":993,"tag":1027,"props":3634,"children":3635},{"class":1029,"line":109},[3636],{"type":993,"tag":1027,"props":3637,"children":3638},{"style":1054},[3639],{"type":999,"value":1107},{"type":993,"tag":1027,"props":3641,"children":3642},{"class":1029,"line":118},[3643,3647,3652],{"type":993,"tag":1027,"props":3644,"children":3645},{"style":1042},[3646],{"type":999,"value":1065},{"type":993,"tag":1027,"props":3648,"children":3649},{"style":1048},[3650],{"type":999,"value":3651}," get_total",{"type":993,"tag":1027,"props":3653,"children":3654},{"style":1054},[3655],{"type":999,"value":1076},{"type":993,"tag":1027,"props":3657,"children":3658},{"class":1029,"line":127},[3659,3664,3668],{"type":993,"tag":1027,"props":3660,"children":3661},{"style":1054},[3662],{"type":999,"value":3663},"        total ",{"type":993,"tag":1027,"props":3665,"children":3666},{"style":1042},[3667],{"type":999,"value":1094},{"type":993,"tag":1027,"props":3669,"children":3670},{"style":1068},[3671],{"type":999,"value":1099},{"type":993,"tag":1027,"props":3673,"children":3674},{"class":1029,"line":136},[3675,3680,3685,3689,3693],{"type":993,"tag":1027,"props":3676,"children":3677},{"style":1042},[3678],{"type":999,"value":3679},"        for",{"type":993,"tag":1027,"props":3681,"children":3682},{"style":1054},[3683],{"type":999,"value":3684}," item_data ",{"type":993,"tag":1027,"props":3686,"children":3687},{"style":1042},[3688],{"type":999,"value":3493},{"type":993,"tag":1027,"props":3690,"children":3691},{"style":1068},[3692],{"type":999,"value":1158},{"type":993,"tag":1027,"props":3694,"children":3695},{"style":1054},[3696],{"type":999,"value":3697},".items.values():\n",{"type":993,"tag":1027,"props":3699,"children":3700},{"class":1029,"line":146},[3701,3706,3710,3715,3719,3723,3727,3731,3735],{"type":993,"tag":1027,"props":3702,"children":3703},{"style":1054},[3704],{"type":999,"value":3705},"            total ",{"type":993,"tag":1027,"props":3707,"children":3708},{"style":1042},[3709],{"type":999,"value":1140},{"type":993,"tag":1027,"props":3711,"children":3712},{"style":1054},[3713],{"type":999,"value":3714}," item_data[",{"type":993,"tag":1027,"props":3716,"children":3717},{"style":1273},[3718],{"type":999,"value":3571},{"type":993,"tag":1027,"props":3720,"children":3721},{"style":1054},[3722],{"type":999,"value":3524},{"type":993,"tag":1027,"props":3724,"children":3725},{"style":1042},[3726],{"type":999,"value":2857},{"type":993,"tag":1027,"props":3728,"children":3729},{"style":1054},[3730],{"type":999,"value":3714},{"type":993,"tag":1027,"props":3732,"children":3733},{"style":1273},[3734],{"type":999,"value":3519},{"type":993,"tag":1027,"props":3736,"children":3737},{"style":1054},[3738],{"type":999,"value":3739},"]\n",{"type":993,"tag":1027,"props":3741,"children":3742},{"class":1029,"line":155},[3743,3747],{"type":993,"tag":1027,"props":3744,"children":3745},{"style":1042},[3746],{"type":999,"value":1153},{"type":993,"tag":1027,"props":3748,"children":3749},{"style":1054},[3750],{"type":999,"value":3751}," total\n",{"type":993,"tag":1027,"props":3753,"children":3754},{"class":1029,"line":164},[3755],{"type":993,"tag":1027,"props":3756,"children":3757},{"style":1054},[3758],{"type":999,"value":1107},{"type":993,"tag":1027,"props":3760,"children":3761},{"class":1029,"line":173},[3762,3766,3771],{"type":993,"tag":1027,"props":3763,"children":3764},{"style":1042},[3765],{"type":999,"value":1065},{"type":993,"tag":1027,"props":3767,"children":3768},{"style":1048},[3769],{"type":999,"value":3770}," get_summary",{"type":993,"tag":1027,"props":3772,"children":3773},{"style":1054},[3774],{"type":999,"value":1076},{"type":993,"tag":1027,"props":3776,"children":3777},{"class":1029,"line":182},[3778,3782,3787,3791],{"type":993,"tag":1027,"props":3779,"children":3780},{"style":1042},[3781],{"type":999,"value":1770},{"type":993,"tag":1027,"props":3783,"children":3784},{"style":1042},[3785],{"type":999,"value":3786}," not",{"type":993,"tag":1027,"props":3788,"children":3789},{"style":1068},[3790],{"type":999,"value":1158},{"type":993,"tag":1027,"props":3792,"children":3793},{"style":1054},[3794],{"type":999,"value":3502},{"type":993,"tag":1027,"props":3796,"children":3797},{"class":1029,"line":191},[3798,3802],{"type":993,"tag":1027,"props":3799,"children":3800},{"style":1042},[3801],{"type":999,"value":1818},{"type":993,"tag":1027,"props":3803,"children":3804},{"style":1273},[3805],{"type":999,"value":3806}," \"Cart is empty\"\n",{"type":993,"tag":1027,"props":3808,"children":3809},{"class":1029,"line":201},[3810],{"type":993,"tag":1027,"props":3811,"children":3812},{"style":1054},[3813],{"type":999,"value":3814},"        \n",{"type":993,"tag":1027,"props":3816,"children":3817},{"class":1029,"line":210},[3818,3823,3827],{"type":993,"tag":1027,"props":3819,"children":3820},{"style":1054},[3821],{"type":999,"value":3822},"        summary ",{"type":993,"tag":1027,"props":3824,"children":3825},{"style":1042},[3826],{"type":999,"value":1094},{"type":993,"tag":1027,"props":3828,"children":3829},{"style":1054},[3830],{"type":999,"value":2296},{"type":993,"tag":1027,"props":3832,"children":3833},{"class":1029,"line":219},[3834,3838,3843,3847,3851],{"type":993,"tag":1027,"props":3835,"children":3836},{"style":1042},[3837],{"type":999,"value":3679},{"type":993,"tag":1027,"props":3839,"children":3840},{"style":1054},[3841],{"type":999,"value":3842}," item, data ",{"type":993,"tag":1027,"props":3844,"children":3845},{"style":1042},[3846],{"type":999,"value":3493},{"type":993,"tag":1027,"props":3848,"children":3849},{"style":1068},[3850],{"type":999,"value":1158},{"type":993,"tag":1027,"props":3852,"children":3853},{"style":1054},[3854],{"type":999,"value":3855},".items.items():\n",{"type":993,"tag":1027,"props":3857,"children":3858},{"class":1029,"line":228},[3859,3864,3868,3872,3876,3880,3884,3888,3893,3897,3902,3906,3911,3915,3920,3924,3928,3932,3936,3940],{"type":993,"tag":1027,"props":3860,"children":3861},{"style":1054},[3862],{"type":999,"value":3863},"            line ",{"type":993,"tag":1027,"props":3865,"children":3866},{"style":1042},[3867],{"type":999,"value":1094},{"type":993,"tag":1027,"props":3869,"children":3870},{"style":1042},[3871],{"type":999,"value":1690},{"type":993,"tag":1027,"props":3873,"children":3874},{"style":1273},[3875],{"type":999,"value":1695},{"type":993,"tag":1027,"props":3877,"children":3878},{"style":1068},[3879],{"type":999,"value":1832},{"type":993,"tag":1027,"props":3881,"children":3882},{"style":1054},[3883],{"type":999,"value":3623},{"type":993,"tag":1027,"props":3885,"children":3886},{"style":1068},[3887],{"type":999,"value":1710},{"type":993,"tag":1027,"props":3889,"children":3890},{"style":1273},[3891],{"type":999,"value":3892},": $",{"type":993,"tag":1027,"props":3894,"children":3895},{"style":1068},[3896],{"type":999,"value":1832},{"type":993,"tag":1027,"props":3898,"children":3899},{"style":1054},[3900],{"type":999,"value":3901},"data[",{"type":993,"tag":1027,"props":3903,"children":3904},{"style":1273},[3905],{"type":999,"value":3571},{"type":993,"tag":1027,"props":3907,"children":3908},{"style":1054},[3909],{"type":999,"value":3910},"]",{"type":993,"tag":1027,"props":3912,"children":3913},{"style":1068},[3914],{"type":999,"value":1710},{"type":993,"tag":1027,"props":3916,"children":3917},{"style":1273},[3918],{"type":999,"value":3919}," x ",{"type":993,"tag":1027,"props":3921,"children":3922},{"style":1068},[3923],{"type":999,"value":1832},{"type":993,"tag":1027,"props":3925,"children":3926},{"style":1054},[3927],{"type":999,"value":3901},{"type":993,"tag":1027,"props":3929,"children":3930},{"style":1273},[3931],{"type":999,"value":3519},{"type":993,"tag":1027,"props":3933,"children":3934},{"style":1054},[3935],{"type":999,"value":3910},{"type":993,"tag":1027,"props":3937,"children":3938},{"style":1068},[3939],{"type":999,"value":1710},{"type":993,"tag":1027,"props":3941,"children":3942},{"style":1273},[3943],{"type":999,"value":1733},{"type":993,"tag":1027,"props":3945,"children":3946},{"class":1029,"line":238},[3947],{"type":993,"tag":1027,"props":3948,"children":3949},{"style":1054},[3950],{"type":999,"value":3951},"            summary.append(line)\n",{"type":993,"tag":1027,"props":3953,"children":3954},{"class":1029,"line":247},[3955],{"type":993,"tag":1027,"props":3956,"children":3957},{"style":1054},[3958],{"type":999,"value":3814},{"type":993,"tag":1027,"props":3960,"children":3961},{"class":1029,"line":256},[3962,3966],{"type":993,"tag":1027,"props":3963,"children":3964},{"style":1042},[3965],{"type":999,"value":1153},{"type":993,"tag":1027,"props":3967,"children":3968},{"style":1054},[3969],{"type":999,"value":3970}," {\n",{"type":993,"tag":1027,"props":3972,"children":3973},{"class":1029,"line":265},[3974,3979],{"type":993,"tag":1027,"props":3975,"children":3976},{"style":1273},[3977],{"type":999,"value":3978},"            'items'",{"type":993,"tag":1027,"props":3980,"children":3981},{"style":1054},[3982],{"type":999,"value":3983},": summary,\n",{"type":993,"tag":1027,"props":3985,"children":3986},{"class":1029,"line":274},[3987,3992,3997,4001],{"type":993,"tag":1027,"props":3988,"children":3989},{"style":1273},[3990],{"type":999,"value":3991},"            'total'",{"type":993,"tag":1027,"props":3993,"children":3994},{"style":1054},[3995],{"type":999,"value":3996},": ",{"type":993,"tag":1027,"props":3998,"children":3999},{"style":1068},[4000],{"type":999,"value":1391},{"type":993,"tag":1027,"props":4002,"children":4003},{"style":1054},[4004],{"type":999,"value":4005},".get_total(),\n",{"type":993,"tag":1027,"props":4007,"children":4008},{"class":1029,"line":284},[4009,4014,4018,4023,4028,4032],{"type":993,"tag":1027,"props":4010,"children":4011},{"style":1273},[4012],{"type":999,"value":4013},"            'item_count'",{"type":993,"tag":1027,"props":4015,"children":4016},{"style":1054},[4017],{"type":999,"value":3996},{"type":993,"tag":1027,"props":4019,"children":4020},{"style":1068},[4021],{"type":999,"value":4022},"len",{"type":993,"tag":1027,"props":4024,"children":4025},{"style":1054},[4026],{"type":999,"value":4027},"(",{"type":993,"tag":1027,"props":4029,"children":4030},{"style":1068},[4031],{"type":999,"value":1391},{"type":993,"tag":1027,"props":4033,"children":4034},{"style":1054},[4035],{"type":999,"value":4036},".items)\n",{"type":993,"tag":1027,"props":4038,"children":4039},{"class":1029,"line":293},[4040],{"type":993,"tag":1027,"props":4041,"children":4042},{"style":1054},[4043],{"type":999,"value":4044},"        }\n",{"type":993,"tag":1027,"props":4046,"children":4047},{"class":1029,"line":302},[4048],{"type":993,"tag":1027,"props":4049,"children":4050},{"emptyLinePlaceholder":13},[4051],{"type":999,"value":1284},{"type":993,"tag":1027,"props":4053,"children":4054},{"class":1029,"line":311},[4055,4060,4064],{"type":993,"tag":1027,"props":4056,"children":4057},{"style":1054},[4058],{"type":999,"value":4059},"cart ",{"type":993,"tag":1027,"props":4061,"children":4062},{"style":1042},[4063],{"type":999,"value":1094},{"type":993,"tag":1027,"props":4065,"children":4066},{"style":1054},[4067],{"type":999,"value":4068}," ShoppingCart()\n",{"type":993,"tag":1027,"props":4070,"children":4071},{"class":1029,"line":320},[4072,4077,4082,4086,4091,4095,4099],{"type":993,"tag":1027,"props":4073,"children":4074},{"style":1054},[4075],{"type":999,"value":4076},"cart.add_item(",{"type":993,"tag":1027,"props":4078,"children":4079},{"style":1273},[4080],{"type":999,"value":4081},"\"Apple\"",{"type":993,"tag":1027,"props":4083,"children":4084},{"style":1054},[4085],{"type":999,"value":1488},{"type":993,"tag":1027,"props":4087,"children":4088},{"style":1068},[4089],{"type":999,"value":4090},"1.50",{"type":993,"tag":1027,"props":4092,"children":4093},{"style":1054},[4094],{"type":999,"value":1488},{"type":993,"tag":1027,"props":4096,"children":4097},{"style":1068},[4098],{"type":999,"value":1346},{"type":993,"tag":1027,"props":4100,"children":4101},{"style":1054},[4102],{"type":999,"value":2077},{"type":993,"tag":1027,"props":4104,"children":4105},{"class":1029,"line":329},[4106,4110,4115,4119,4124],{"type":993,"tag":1027,"props":4107,"children":4108},{"style":1054},[4109],{"type":999,"value":4076},{"type":993,"tag":1027,"props":4111,"children":4112},{"style":1273},[4113],{"type":999,"value":4114},"\"Bread\"",{"type":993,"tag":1027,"props":4116,"children":4117},{"style":1054},[4118],{"type":999,"value":1488},{"type":993,"tag":1027,"props":4120,"children":4121},{"style":1068},[4122],{"type":999,"value":4123},"2.99",{"type":993,"tag":1027,"props":4125,"children":4126},{"style":1054},[4127],{"type":999,"value":2077},{"type":993,"tag":1027,"props":4129,"children":4130},{"class":1029,"line":338},[4131],{"type":993,"tag":1027,"props":4132,"children":4133},{"emptyLinePlaceholder":13},[4134],{"type":999,"value":1284},{"type":993,"tag":1027,"props":4136,"children":4137},{"class":1029,"line":347},[4138,4142,4146,4151,4156,4160,4165,4169,4173],{"type":993,"tag":1027,"props":4139,"children":4140},{"style":1068},[4141],{"type":999,"value":1309},{"type":993,"tag":1027,"props":4143,"children":4144},{"style":1054},[4145],{"type":999,"value":4027},{"type":993,"tag":1027,"props":4147,"children":4148},{"style":1042},[4149],{"type":999,"value":4150},"f",{"type":993,"tag":1027,"props":4152,"children":4153},{"style":1273},[4154],{"type":999,"value":4155},"\"Total: $",{"type":993,"tag":1027,"props":4157,"children":4158},{"style":1068},[4159],{"type":999,"value":1832},{"type":993,"tag":1027,"props":4161,"children":4162},{"style":1054},[4163],{"type":999,"value":4164},"cart.get_total()",{"type":993,"tag":1027,"props":4166,"children":4167},{"style":1068},[4168],{"type":999,"value":1710},{"type":993,"tag":1027,"props":4170,"children":4171},{"style":1273},[4172],{"type":999,"value":1695},{"type":993,"tag":1027,"props":4174,"children":4175},{"style":1054},[4176],{"type":999,"value":2077},{"type":993,"tag":1027,"props":4178,"children":4179},{"class":1029,"line":356},[4180,4185,4189],{"type":993,"tag":1027,"props":4181,"children":4182},{"style":1054},[4183],{"type":999,"value":4184},"summary ",{"type":993,"tag":1027,"props":4186,"children":4187},{"style":1042},[4188],{"type":999,"value":1094},{"type":993,"tag":1027,"props":4190,"children":4191},{"style":1054},[4192],{"type":999,"value":4193}," cart.get_summary()\n",{"type":993,"tag":1027,"props":4195,"children":4196},{"class":1029,"line":365},[4197,4202,4206,4210,4215,4220],{"type":993,"tag":1027,"props":4198,"children":4199},{"style":1042},[4200],{"type":999,"value":4201},"for",{"type":993,"tag":1027,"props":4203,"children":4204},{"style":1054},[4205],{"type":999,"value":3488},{"type":993,"tag":1027,"props":4207,"children":4208},{"style":1042},[4209],{"type":999,"value":3493},{"type":993,"tag":1027,"props":4211,"children":4212},{"style":1054},[4213],{"type":999,"value":4214}," summary[",{"type":993,"tag":1027,"props":4216,"children":4217},{"style":1273},[4218],{"type":999,"value":4219},"'items'",{"type":993,"tag":1027,"props":4221,"children":4222},{"style":1054},[4223],{"type":999,"value":4224},"]:\n",{"type":993,"tag":1027,"props":4226,"children":4227},{"class":1029,"line":374},[4228,4233],{"type":993,"tag":1027,"props":4229,"children":4230},{"style":1068},[4231],{"type":999,"value":4232},"    print",{"type":993,"tag":1027,"props":4234,"children":4235},{"style":1054},[4236],{"type":999,"value":4237},"(item)\n",{"type":993,"tag":1375,"props":4239,"children":4241},{"id":4240},"special-methods-magic-methods",[4242],{"type":999,"value":4243},"🚀 Special Methods (Magic Methods)",{"type":993,"tag":1002,"props":4245,"children":4246},{},[4247],{"type":999,"value":4248},"Python provides special methods that enable objects to work with built-in functions and operators. These methods have double underscores and unlock powerful functionality for your objects.",{"type":993,"tag":1395,"props":4250,"children":4254},{"title":4251,"type":4252,"emoji":4253},"Common Special Methods","success","✨",[4255,4263,4295,4303,4361,4369,4425,4433],{"type":993,"tag":1002,"props":4256,"children":4257},{},[4258],{"type":993,"tag":1405,"props":4259,"children":4260},{},[4261],{"type":999,"value":4262},"String Representation:",{"type":993,"tag":1411,"props":4264,"children":4265},{},[4266,4284],{"type":993,"tag":1415,"props":4267,"children":4268},{},[4269,4275,4277,4283],{"type":993,"tag":1023,"props":4270,"children":4272},{"className":4271},[],[4273],{"type":999,"value":4274},"__str__(self)",{"type":999,"value":4276},": Human-readable string (used by ",{"type":993,"tag":1023,"props":4278,"children":4280},{"className":4279},[],[4281],{"type":999,"value":4282},"print()",{"type":999,"value":1496},{"type":993,"tag":1415,"props":4285,"children":4286},{},[4287,4293],{"type":993,"tag":1023,"props":4288,"children":4290},{"className":4289},[],[4291],{"type":999,"value":4292},"__repr__(self)",{"type":999,"value":4294},": Developer-focused representation",{"type":993,"tag":1002,"props":4296,"children":4297},{},[4298],{"type":993,"tag":1405,"props":4299,"children":4300},{},[4301],{"type":999,"value":4302},"Comparison Methods:",{"type":993,"tag":1411,"props":4304,"children":4305},{},[4306,4324,4342],{"type":993,"tag":1415,"props":4307,"children":4308},{},[4309,4315,4317,4323],{"type":993,"tag":1023,"props":4310,"children":4312},{"className":4311},[],[4313],{"type":999,"value":4314},"__eq__(self, other)",{"type":999,"value":4316},": Equality comparison (",{"type":993,"tag":1023,"props":4318,"children":4320},{"className":4319},[],[4321],{"type":999,"value":4322},"==",{"type":999,"value":1496},{"type":993,"tag":1415,"props":4325,"children":4326},{},[4327,4333,4335,4341],{"type":993,"tag":1023,"props":4328,"children":4330},{"className":4329},[],[4331],{"type":999,"value":4332},"__lt__(self, other)",{"type":999,"value":4334},": Less than comparison (",{"type":993,"tag":1023,"props":4336,"children":4338},{"className":4337},[],[4339],{"type":999,"value":4340},"\u003C",{"type":999,"value":1496},{"type":993,"tag":1415,"props":4343,"children":4344},{},[4345,4351,4353,4359],{"type":993,"tag":1023,"props":4346,"children":4348},{"className":4347},[],[4349],{"type":999,"value":4350},"__len__(self)",{"type":999,"value":4352},": Enable ",{"type":993,"tag":1023,"props":4354,"children":4356},{"className":4355},[],[4357],{"type":999,"value":4358},"len()",{"type":999,"value":4360}," function",{"type":993,"tag":1002,"props":4362,"children":4363},{},[4364],{"type":993,"tag":1405,"props":4365,"children":4366},{},[4367],{"type":999,"value":4368},"Arithmetic Methods:",{"type":993,"tag":1411,"props":4370,"children":4371},{},[4372,4390,4408],{"type":993,"tag":1415,"props":4373,"children":4374},{},[4375,4381,4383,4389],{"type":993,"tag":1023,"props":4376,"children":4378},{"className":4377},[],[4379],{"type":999,"value":4380},"__add__(self, other)",{"type":999,"value":4382},": Addition (",{"type":993,"tag":1023,"props":4384,"children":4386},{"className":4385},[],[4387],{"type":999,"value":4388},"+",{"type":999,"value":1496},{"type":993,"tag":1415,"props":4391,"children":4392},{},[4393,4399,4401,4407],{"type":993,"tag":1023,"props":4394,"children":4396},{"className":4395},[],[4397],{"type":999,"value":4398},"__sub__(self, other)",{"type":999,"value":4400},": Subtraction (",{"type":993,"tag":1023,"props":4402,"children":4404},{"className":4403},[],[4405],{"type":999,"value":4406},"-",{"type":999,"value":1496},{"type":993,"tag":1415,"props":4409,"children":4410},{},[4411,4417,4419,4424],{"type":993,"tag":1023,"props":4412,"children":4414},{"className":4413},[],[4415],{"type":999,"value":4416},"__mul__(self, other)",{"type":999,"value":4418},": Multiplication (",{"type":993,"tag":1023,"props":4420,"children":4422},{"className":4421},[],[4423],{"type":999,"value":2857},{"type":999,"value":1496},{"type":993,"tag":1002,"props":4426,"children":4427},{},[4428],{"type":993,"tag":1405,"props":4429,"children":4430},{},[4431],{"type":999,"value":4432},"Container Methods:",{"type":993,"tag":1411,"props":4434,"children":4435},{},[4436,4454],{"type":993,"tag":1415,"props":4437,"children":4438},{},[4439,4445,4447,4453],{"type":993,"tag":1023,"props":4440,"children":4442},{"className":4441},[],[4443],{"type":999,"value":4444},"__getitem__(self, key)",{"type":999,"value":4446},": Enable indexing (",{"type":993,"tag":1023,"props":4448,"children":4450},{"className":4449},[],[4451],{"type":999,"value":4452},"obj[key]",{"type":999,"value":1496},{"type":993,"tag":1415,"props":4455,"children":4456},{},[4457,4463],{"type":993,"tag":1023,"props":4458,"children":4460},{"className":4459},[],[4461],{"type":999,"value":4462},"__setitem__(self, key, value)",{"type":999,"value":4464},": Enable item assignment",{"type":993,"tag":1534,"props":4466,"children":4468},{"id":4467},"string-representation-methods",[4469],{"type":999,"value":4470},"String Representation Methods",{"type":993,"tag":1002,"props":4472,"children":4473},{},[4474,4475,4480,4482,4488],{"type":999,"value":2184},{"type":993,"tag":1023,"props":4476,"children":4478},{"className":4477},[],[4479],{"type":999,"value":1486},{"type":999,"value":4481}," and ",{"type":993,"tag":1023,"props":4483,"children":4485},{"className":4484},[],[4486],{"type":999,"value":4487},"__repr__",{"type":999,"value":4489}," methods control how objects appear when printed or converted to strings.",{"type":993,"tag":1013,"props":4491,"children":4492},{},[4493],{"type":993,"tag":1017,"props":4494,"children":4496},{"className":1019,"code":4495,"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 __str__(self):  # For end users\n        return f\"{self.name} - ${self.price}\"\n    \n    def __repr__(self):  # For developers\n        return f\"Product('{self.name}', {self.price}, {self.stock})\"\n    \n    def __len__(self):  # Enable len() function\n        return self.stock\n\n# Special methods in action\nlaptop = Product(\"Laptop\", 999, 5)\nprint(laptop)          # Uses __str__\nprint(repr(laptop))    # Uses __repr__\nprint(len(laptop))     # Uses __len__\nprint(f\"Stock: {len(laptop)} units\")\n",[4497],{"type":993,"tag":1023,"props":4498,"children":4499},{"__ignoreMap":8},[4500,4516,4532,4551,4572,4593,4600,4621,4670,4677,4698,4765,4772,4793,4809,4816,4824,4867,4884,4910,4935],{"type":993,"tag":1027,"props":4501,"children":4502},{"class":1029,"line":12},[4503,4507,4512],{"type":993,"tag":1027,"props":4504,"children":4505},{"style":1042},[4506],{"type":999,"value":1045},{"type":993,"tag":1027,"props":4508,"children":4509},{"style":1048},[4510],{"type":999,"value":4511}," Product",{"type":993,"tag":1027,"props":4513,"children":4514},{"style":1054},[4515],{"type":999,"value":1057},{"type":993,"tag":1027,"props":4517,"children":4518},{"class":1029,"line":27},[4519,4523,4527],{"type":993,"tag":1027,"props":4520,"children":4521},{"style":1042},[4522],{"type":999,"value":1065},{"type":993,"tag":1027,"props":4524,"children":4525},{"style":1068},[4526],{"type":999,"value":1071},{"type":993,"tag":1027,"props":4528,"children":4529},{"style":1054},[4530],{"type":999,"value":4531},"(self, name, price, stock):\n",{"type":993,"tag":1027,"props":4533,"children":4534},{"class":1029,"line":36},[4535,4539,4543,4547],{"type":993,"tag":1027,"props":4536,"children":4537},{"style":1068},[4538],{"type":999,"value":1084},{"type":993,"tag":1027,"props":4540,"children":4541},{"style":1054},[4542],{"type":999,"value":2245},{"type":993,"tag":1027,"props":4544,"children":4545},{"style":1042},[4546],{"type":999,"value":1094},{"type":993,"tag":1027,"props":4548,"children":4549},{"style":1054},[4550],{"type":999,"value":2254},{"type":993,"tag":1027,"props":4552,"children":4553},{"class":1029,"line":45},[4554,4558,4563,4567],{"type":993,"tag":1027,"props":4555,"children":4556},{"style":1068},[4557],{"type":999,"value":1084},{"type":993,"tag":1027,"props":4559,"children":4560},{"style":1054},[4561],{"type":999,"value":4562},".price ",{"type":993,"tag":1027,"props":4564,"children":4565},{"style":1042},[4566],{"type":999,"value":1094},{"type":993,"tag":1027,"props":4568,"children":4569},{"style":1054},[4570],{"type":999,"value":4571}," price\n",{"type":993,"tag":1027,"props":4573,"children":4574},{"class":1029,"line":54},[4575,4579,4584,4588],{"type":993,"tag":1027,"props":4576,"children":4577},{"style":1068},[4578],{"type":999,"value":1084},{"type":993,"tag":1027,"props":4580,"children":4581},{"style":1054},[4582],{"type":999,"value":4583},".stock ",{"type":993,"tag":1027,"props":4585,"children":4586},{"style":1042},[4587],{"type":999,"value":1094},{"type":993,"tag":1027,"props":4589,"children":4590},{"style":1054},[4591],{"type":999,"value":4592}," stock\n",{"type":993,"tag":1027,"props":4594,"children":4595},{"class":1029,"line":63},[4596],{"type":993,"tag":1027,"props":4597,"children":4598},{"style":1054},[4599],{"type":999,"value":1107},{"type":993,"tag":1027,"props":4601,"children":4602},{"class":1029,"line":72},[4603,4607,4612,4616],{"type":993,"tag":1027,"props":4604,"children":4605},{"style":1042},[4606],{"type":999,"value":1065},{"type":993,"tag":1027,"props":4608,"children":4609},{"style":1068},[4610],{"type":999,"value":4611}," __str__",{"type":993,"tag":1027,"props":4613,"children":4614},{"style":1054},[4615],{"type":999,"value":1673},{"type":993,"tag":1027,"props":4617,"children":4618},{"style":1033},[4619],{"type":999,"value":4620},"# For end users\n",{"type":993,"tag":1027,"props":4622,"children":4623},{"class":1029,"line":81},[4624,4628,4632,4636,4640,4644,4648,4653,4657,4662,4666],{"type":993,"tag":1027,"props":4625,"children":4626},{"style":1042},[4627],{"type":999,"value":1153},{"type":993,"tag":1027,"props":4629,"children":4630},{"style":1042},[4631],{"type":999,"value":1690},{"type":993,"tag":1027,"props":4633,"children":4634},{"style":1273},[4635],{"type":999,"value":1695},{"type":993,"tag":1027,"props":4637,"children":4638},{"style":1068},[4639],{"type":999,"value":1700},{"type":993,"tag":1027,"props":4641,"children":4642},{"style":1054},[4643],{"type":999,"value":2364},{"type":993,"tag":1027,"props":4645,"children":4646},{"style":1068},[4647],{"type":999,"value":1710},{"type":993,"tag":1027,"props":4649,"children":4650},{"style":1273},[4651],{"type":999,"value":4652}," - $",{"type":993,"tag":1027,"props":4654,"children":4655},{"style":1068},[4656],{"type":999,"value":1700},{"type":993,"tag":1027,"props":4658,"children":4659},{"style":1054},[4660],{"type":999,"value":4661},".price",{"type":993,"tag":1027,"props":4663,"children":4664},{"style":1068},[4665],{"type":999,"value":1710},{"type":993,"tag":1027,"props":4667,"children":4668},{"style":1273},[4669],{"type":999,"value":1733},{"type":993,"tag":1027,"props":4671,"children":4672},{"class":1029,"line":91},[4673],{"type":993,"tag":1027,"props":4674,"children":4675},{"style":1054},[4676],{"type":999,"value":1107},{"type":993,"tag":1027,"props":4678,"children":4679},{"class":1029,"line":100},[4680,4684,4689,4693],{"type":993,"tag":1027,"props":4681,"children":4682},{"style":1042},[4683],{"type":999,"value":1065},{"type":993,"tag":1027,"props":4685,"children":4686},{"style":1068},[4687],{"type":999,"value":4688}," __repr__",{"type":993,"tag":1027,"props":4690,"children":4691},{"style":1054},[4692],{"type":999,"value":1673},{"type":993,"tag":1027,"props":4694,"children":4695},{"style":1033},[4696],{"type":999,"value":4697},"# For developers\n",{"type":993,"tag":1027,"props":4699,"children":4700},{"class":1029,"line":109},[4701,4705,4709,4714,4718,4722,4726,4731,4735,4739,4743,4747,4751,4756,4760],{"type":993,"tag":1027,"props":4702,"children":4703},{"style":1042},[4704],{"type":999,"value":1153},{"type":993,"tag":1027,"props":4706,"children":4707},{"style":1042},[4708],{"type":999,"value":1690},{"type":993,"tag":1027,"props":4710,"children":4711},{"style":1273},[4712],{"type":999,"value":4713},"\"Product('",{"type":993,"tag":1027,"props":4715,"children":4716},{"style":1068},[4717],{"type":999,"value":1700},{"type":993,"tag":1027,"props":4719,"children":4720},{"style":1054},[4721],{"type":999,"value":2364},{"type":993,"tag":1027,"props":4723,"children":4724},{"style":1068},[4725],{"type":999,"value":1710},{"type":993,"tag":1027,"props":4727,"children":4728},{"style":1273},[4729],{"type":999,"value":4730},"', ",{"type":993,"tag":1027,"props":4732,"children":4733},{"style":1068},[4734],{"type":999,"value":1700},{"type":993,"tag":1027,"props":4736,"children":4737},{"style":1054},[4738],{"type":999,"value":4661},{"type":993,"tag":1027,"props":4740,"children":4741},{"style":1068},[4742],{"type":999,"value":1710},{"type":993,"tag":1027,"props":4744,"children":4745},{"style":1273},[4746],{"type":999,"value":1488},{"type":993,"tag":1027,"props":4748,"children":4749},{"style":1068},[4750],{"type":999,"value":1700},{"type":993,"tag":1027,"props":4752,"children":4753},{"style":1054},[4754],{"type":999,"value":4755},".stock",{"type":993,"tag":1027,"props":4757,"children":4758},{"style":1068},[4759],{"type":999,"value":1710},{"type":993,"tag":1027,"props":4761,"children":4762},{"style":1273},[4763],{"type":999,"value":4764},")\"\n",{"type":993,"tag":1027,"props":4766,"children":4767},{"class":1029,"line":118},[4768],{"type":993,"tag":1027,"props":4769,"children":4770},{"style":1054},[4771],{"type":999,"value":1107},{"type":993,"tag":1027,"props":4773,"children":4774},{"class":1029,"line":127},[4775,4779,4784,4788],{"type":993,"tag":1027,"props":4776,"children":4777},{"style":1042},[4778],{"type":999,"value":1065},{"type":993,"tag":1027,"props":4780,"children":4781},{"style":1068},[4782],{"type":999,"value":4783}," __len__",{"type":993,"tag":1027,"props":4785,"children":4786},{"style":1054},[4787],{"type":999,"value":1673},{"type":993,"tag":1027,"props":4789,"children":4790},{"style":1033},[4791],{"type":999,"value":4792},"# Enable len() function\n",{"type":993,"tag":1027,"props":4794,"children":4795},{"class":1029,"line":136},[4796,4800,4804],{"type":993,"tag":1027,"props":4797,"children":4798},{"style":1042},[4799],{"type":999,"value":1153},{"type":993,"tag":1027,"props":4801,"children":4802},{"style":1068},[4803],{"type":999,"value":1158},{"type":993,"tag":1027,"props":4805,"children":4806},{"style":1054},[4807],{"type":999,"value":4808},".stock\n",{"type":993,"tag":1027,"props":4810,"children":4811},{"class":1029,"line":146},[4812],{"type":993,"tag":1027,"props":4813,"children":4814},{"emptyLinePlaceholder":13},[4815],{"type":999,"value":1284},{"type":993,"tag":1027,"props":4817,"children":4818},{"class":1029,"line":155},[4819],{"type":993,"tag":1027,"props":4820,"children":4821},{"style":1033},[4822],{"type":999,"value":4823},"# Special methods in action\n",{"type":993,"tag":1027,"props":4825,"children":4826},{"class":1029,"line":164},[4827,4832,4836,4841,4846,4850,4855,4859,4863],{"type":993,"tag":1027,"props":4828,"children":4829},{"style":1054},[4830],{"type":999,"value":4831},"laptop ",{"type":993,"tag":1027,"props":4833,"children":4834},{"style":1042},[4835],{"type":999,"value":1094},{"type":993,"tag":1027,"props":4837,"children":4838},{"style":1054},[4839],{"type":999,"value":4840}," Product(",{"type":993,"tag":1027,"props":4842,"children":4843},{"style":1273},[4844],{"type":999,"value":4845},"\"Laptop\"",{"type":993,"tag":1027,"props":4847,"children":4848},{"style":1054},[4849],{"type":999,"value":1488},{"type":993,"tag":1027,"props":4851,"children":4852},{"style":1068},[4853],{"type":999,"value":4854},"999",{"type":993,"tag":1027,"props":4856,"children":4857},{"style":1054},[4858],{"type":999,"value":1488},{"type":993,"tag":1027,"props":4860,"children":4861},{"style":1068},[4862],{"type":999,"value":1319},{"type":993,"tag":1027,"props":4864,"children":4865},{"style":1054},[4866],{"type":999,"value":2077},{"type":993,"tag":1027,"props":4868,"children":4869},{"class":1029,"line":173},[4870,4874,4879],{"type":993,"tag":1027,"props":4871,"children":4872},{"style":1068},[4873],{"type":999,"value":1309},{"type":993,"tag":1027,"props":4875,"children":4876},{"style":1054},[4877],{"type":999,"value":4878},"(laptop)          ",{"type":993,"tag":1027,"props":4880,"children":4881},{"style":1033},[4882],{"type":999,"value":4883},"# Uses __str__\n",{"type":993,"tag":1027,"props":4885,"children":4886},{"class":1029,"line":182},[4887,4891,4895,4900,4905],{"type":993,"tag":1027,"props":4888,"children":4889},{"style":1068},[4890],{"type":999,"value":1309},{"type":993,"tag":1027,"props":4892,"children":4893},{"style":1054},[4894],{"type":999,"value":4027},{"type":993,"tag":1027,"props":4896,"children":4897},{"style":1068},[4898],{"type":999,"value":4899},"repr",{"type":993,"tag":1027,"props":4901,"children":4902},{"style":1054},[4903],{"type":999,"value":4904},"(laptop))    ",{"type":993,"tag":1027,"props":4906,"children":4907},{"style":1033},[4908],{"type":999,"value":4909},"# Uses __repr__\n",{"type":993,"tag":1027,"props":4911,"children":4912},{"class":1029,"line":191},[4913,4917,4921,4925,4930],{"type":993,"tag":1027,"props":4914,"children":4915},{"style":1068},[4916],{"type":999,"value":1309},{"type":993,"tag":1027,"props":4918,"children":4919},{"style":1054},[4920],{"type":999,"value":4027},{"type":993,"tag":1027,"props":4922,"children":4923},{"style":1068},[4924],{"type":999,"value":4022},{"type":993,"tag":1027,"props":4926,"children":4927},{"style":1054},[4928],{"type":999,"value":4929},"(laptop))     ",{"type":993,"tag":1027,"props":4931,"children":4932},{"style":1033},[4933],{"type":999,"value":4934},"# Uses __len__\n",{"type":993,"tag":1027,"props":4936,"children":4937},{"class":1029,"line":201},[4938,4942,4946,4950,4955,4960,4965,4969,4974],{"type":993,"tag":1027,"props":4939,"children":4940},{"style":1068},[4941],{"type":999,"value":1309},{"type":993,"tag":1027,"props":4943,"children":4944},{"style":1054},[4945],{"type":999,"value":4027},{"type":993,"tag":1027,"props":4947,"children":4948},{"style":1042},[4949],{"type":999,"value":4150},{"type":993,"tag":1027,"props":4951,"children":4952},{"style":1273},[4953],{"type":999,"value":4954},"\"Stock: ",{"type":993,"tag":1027,"props":4956,"children":4957},{"style":1068},[4958],{"type":999,"value":4959},"{len",{"type":993,"tag":1027,"props":4961,"children":4962},{"style":1054},[4963],{"type":999,"value":4964},"(laptop)",{"type":993,"tag":1027,"props":4966,"children":4967},{"style":1068},[4968],{"type":999,"value":1710},{"type":993,"tag":1027,"props":4970,"children":4971},{"style":1273},[4972],{"type":999,"value":4973}," units\"",{"type":993,"tag":1027,"props":4975,"children":4976},{"style":1054},[4977],{"type":999,"value":2077},{"type":993,"tag":1534,"props":4979,"children":4981},{"id":4980},"comparison-and-arithmetic-methods",[4982],{"type":999,"value":4983},"Comparison and Arithmetic Methods",{"type":993,"tag":1002,"props":4985,"children":4986},{},[4987],{"type":999,"value":4988},"Special methods enable your objects to work with comparison operators and arithmetic operations.",{"type":993,"tag":1013,"props":4990,"children":4991},{},[4992],{"type":993,"tag":1017,"props":4993,"children":4995},{"className":1019,"code":4994,"language":6,"meta":8,"style":8},"class Score:\n    def __init__(self, points):\n        self.points = points\n    \n    def __str__(self):\n        return f\"{self.points} points\"\n    \n    def __eq__(self, other):  # Enable == comparison\n        return self.points == other.points\n    \n    def __lt__(self, other):  # Enable \u003C comparison\n        return self.points \u003C other.points\n    \n    def __add__(self, other):  # Enable + operation\n        return Score(self.points + other.points)\n    \n    def __sub__(self, other):  # Enable - operation\n        return Score(self.points - other.points)\n\n# Using comparison and arithmetic\nscore1 = Score(100)\nscore2 = Score(85)\n\nprint(f\"Score 1: {score1}\")\nprint(f\"Score 2: {score2}\")\nprint(f\"Equal? {score1 == score2}\")\nprint(f\"Score 1 higher? {score1 > score2}\")\nprint(f\"Combined: {score1 + score2}\")\nprint(f\"Difference: {score1 - score2}\")\n",[4996],{"type":993,"tag":1023,"props":4997,"children":4998},{"__ignoreMap":8},[4999,5015,5031,5052,5059,5074,5107,5114,5136,5160,5167,5188,5211,5218,5239,5268,5275,5296,5323,5330,5338,5362,5387,5394,5435,5476,5525,5573,5621],{"type":993,"tag":1027,"props":5000,"children":5001},{"class":1029,"line":12},[5002,5006,5011],{"type":993,"tag":1027,"props":5003,"children":5004},{"style":1042},[5005],{"type":999,"value":1045},{"type":993,"tag":1027,"props":5007,"children":5008},{"style":1048},[5009],{"type":999,"value":5010}," Score",{"type":993,"tag":1027,"props":5012,"children":5013},{"style":1054},[5014],{"type":999,"value":1057},{"type":993,"tag":1027,"props":5016,"children":5017},{"class":1029,"line":27},[5018,5022,5026],{"type":993,"tag":1027,"props":5019,"children":5020},{"style":1042},[5021],{"type":999,"value":1065},{"type":993,"tag":1027,"props":5023,"children":5024},{"style":1068},[5025],{"type":999,"value":1071},{"type":993,"tag":1027,"props":5027,"children":5028},{"style":1054},[5029],{"type":999,"value":5030},"(self, points):\n",{"type":993,"tag":1027,"props":5032,"children":5033},{"class":1029,"line":36},[5034,5038,5043,5047],{"type":993,"tag":1027,"props":5035,"children":5036},{"style":1068},[5037],{"type":999,"value":1084},{"type":993,"tag":1027,"props":5039,"children":5040},{"style":1054},[5041],{"type":999,"value":5042},".points ",{"type":993,"tag":1027,"props":5044,"children":5045},{"style":1042},[5046],{"type":999,"value":1094},{"type":993,"tag":1027,"props":5048,"children":5049},{"style":1054},[5050],{"type":999,"value":5051}," points\n",{"type":993,"tag":1027,"props":5053,"children":5054},{"class":1029,"line":45},[5055],{"type":993,"tag":1027,"props":5056,"children":5057},{"style":1054},[5058],{"type":999,"value":1107},{"type":993,"tag":1027,"props":5060,"children":5061},{"class":1029,"line":54},[5062,5066,5070],{"type":993,"tag":1027,"props":5063,"children":5064},{"style":1042},[5065],{"type":999,"value":1065},{"type":993,"tag":1027,"props":5067,"children":5068},{"style":1068},[5069],{"type":999,"value":4611},{"type":993,"tag":1027,"props":5071,"children":5072},{"style":1054},[5073],{"type":999,"value":1076},{"type":993,"tag":1027,"props":5075,"children":5076},{"class":1029,"line":63},[5077,5081,5085,5089,5093,5098,5102],{"type":993,"tag":1027,"props":5078,"children":5079},{"style":1042},[5080],{"type":999,"value":1153},{"type":993,"tag":1027,"props":5082,"children":5083},{"style":1042},[5084],{"type":999,"value":1690},{"type":993,"tag":1027,"props":5086,"children":5087},{"style":1273},[5088],{"type":999,"value":1695},{"type":993,"tag":1027,"props":5090,"children":5091},{"style":1068},[5092],{"type":999,"value":1700},{"type":993,"tag":1027,"props":5094,"children":5095},{"style":1054},[5096],{"type":999,"value":5097},".points",{"type":993,"tag":1027,"props":5099,"children":5100},{"style":1068},[5101],{"type":999,"value":1710},{"type":993,"tag":1027,"props":5103,"children":5104},{"style":1273},[5105],{"type":999,"value":5106}," points\"\n",{"type":993,"tag":1027,"props":5108,"children":5109},{"class":1029,"line":72},[5110],{"type":993,"tag":1027,"props":5111,"children":5112},{"style":1054},[5113],{"type":999,"value":1107},{"type":993,"tag":1027,"props":5115,"children":5116},{"class":1029,"line":81},[5117,5121,5126,5131],{"type":993,"tag":1027,"props":5118,"children":5119},{"style":1042},[5120],{"type":999,"value":1065},{"type":993,"tag":1027,"props":5122,"children":5123},{"style":1068},[5124],{"type":999,"value":5125}," __eq__",{"type":993,"tag":1027,"props":5127,"children":5128},{"style":1054},[5129],{"type":999,"value":5130},"(self, other):  ",{"type":993,"tag":1027,"props":5132,"children":5133},{"style":1033},[5134],{"type":999,"value":5135},"# Enable == comparison\n",{"type":993,"tag":1027,"props":5137,"children":5138},{"class":1029,"line":91},[5139,5143,5147,5151,5155],{"type":993,"tag":1027,"props":5140,"children":5141},{"style":1042},[5142],{"type":999,"value":1153},{"type":993,"tag":1027,"props":5144,"children":5145},{"style":1068},[5146],{"type":999,"value":1158},{"type":993,"tag":1027,"props":5148,"children":5149},{"style":1054},[5150],{"type":999,"value":5042},{"type":993,"tag":1027,"props":5152,"children":5153},{"style":1042},[5154],{"type":999,"value":4322},{"type":993,"tag":1027,"props":5156,"children":5157},{"style":1054},[5158],{"type":999,"value":5159}," other.points\n",{"type":993,"tag":1027,"props":5161,"children":5162},{"class":1029,"line":100},[5163],{"type":993,"tag":1027,"props":5164,"children":5165},{"style":1054},[5166],{"type":999,"value":1107},{"type":993,"tag":1027,"props":5168,"children":5169},{"class":1029,"line":109},[5170,5174,5179,5183],{"type":993,"tag":1027,"props":5171,"children":5172},{"style":1042},[5173],{"type":999,"value":1065},{"type":993,"tag":1027,"props":5175,"children":5176},{"style":1068},[5177],{"type":999,"value":5178}," __lt__",{"type":993,"tag":1027,"props":5180,"children":5181},{"style":1054},[5182],{"type":999,"value":5130},{"type":993,"tag":1027,"props":5184,"children":5185},{"style":1033},[5186],{"type":999,"value":5187},"# Enable \u003C comparison\n",{"type":993,"tag":1027,"props":5189,"children":5190},{"class":1029,"line":118},[5191,5195,5199,5203,5207],{"type":993,"tag":1027,"props":5192,"children":5193},{"style":1042},[5194],{"type":999,"value":1153},{"type":993,"tag":1027,"props":5196,"children":5197},{"style":1068},[5198],{"type":999,"value":1158},{"type":993,"tag":1027,"props":5200,"children":5201},{"style":1054},[5202],{"type":999,"value":5042},{"type":993,"tag":1027,"props":5204,"children":5205},{"style":1042},[5206],{"type":999,"value":4340},{"type":993,"tag":1027,"props":5208,"children":5209},{"style":1054},[5210],{"type":999,"value":5159},{"type":993,"tag":1027,"props":5212,"children":5213},{"class":1029,"line":127},[5214],{"type":993,"tag":1027,"props":5215,"children":5216},{"style":1054},[5217],{"type":999,"value":1107},{"type":993,"tag":1027,"props":5219,"children":5220},{"class":1029,"line":136},[5221,5225,5230,5234],{"type":993,"tag":1027,"props":5222,"children":5223},{"style":1042},[5224],{"type":999,"value":1065},{"type":993,"tag":1027,"props":5226,"children":5227},{"style":1068},[5228],{"type":999,"value":5229}," __add__",{"type":993,"tag":1027,"props":5231,"children":5232},{"style":1054},[5233],{"type":999,"value":5130},{"type":993,"tag":1027,"props":5235,"children":5236},{"style":1033},[5237],{"type":999,"value":5238},"# Enable + operation\n",{"type":993,"tag":1027,"props":5240,"children":5241},{"class":1029,"line":146},[5242,5246,5251,5255,5259,5263],{"type":993,"tag":1027,"props":5243,"children":5244},{"style":1042},[5245],{"type":999,"value":1153},{"type":993,"tag":1027,"props":5247,"children":5248},{"style":1054},[5249],{"type":999,"value":5250}," Score(",{"type":993,"tag":1027,"props":5252,"children":5253},{"style":1068},[5254],{"type":999,"value":1391},{"type":993,"tag":1027,"props":5256,"children":5257},{"style":1054},[5258],{"type":999,"value":5042},{"type":993,"tag":1027,"props":5260,"children":5261},{"style":1042},[5262],{"type":999,"value":4388},{"type":993,"tag":1027,"props":5264,"children":5265},{"style":1054},[5266],{"type":999,"value":5267}," other.points)\n",{"type":993,"tag":1027,"props":5269,"children":5270},{"class":1029,"line":155},[5271],{"type":993,"tag":1027,"props":5272,"children":5273},{"style":1054},[5274],{"type":999,"value":1107},{"type":993,"tag":1027,"props":5276,"children":5277},{"class":1029,"line":164},[5278,5282,5287,5291],{"type":993,"tag":1027,"props":5279,"children":5280},{"style":1042},[5281],{"type":999,"value":1065},{"type":993,"tag":1027,"props":5283,"children":5284},{"style":1068},[5285],{"type":999,"value":5286}," __sub__",{"type":993,"tag":1027,"props":5288,"children":5289},{"style":1054},[5290],{"type":999,"value":5130},{"type":993,"tag":1027,"props":5292,"children":5293},{"style":1033},[5294],{"type":999,"value":5295},"# Enable - operation\n",{"type":993,"tag":1027,"props":5297,"children":5298},{"class":1029,"line":173},[5299,5303,5307,5311,5315,5319],{"type":993,"tag":1027,"props":5300,"children":5301},{"style":1042},[5302],{"type":999,"value":1153},{"type":993,"tag":1027,"props":5304,"children":5305},{"style":1054},[5306],{"type":999,"value":5250},{"type":993,"tag":1027,"props":5308,"children":5309},{"style":1068},[5310],{"type":999,"value":1391},{"type":993,"tag":1027,"props":5312,"children":5313},{"style":1054},[5314],{"type":999,"value":5042},{"type":993,"tag":1027,"props":5316,"children":5317},{"style":1042},[5318],{"type":999,"value":4406},{"type":993,"tag":1027,"props":5320,"children":5321},{"style":1054},[5322],{"type":999,"value":5267},{"type":993,"tag":1027,"props":5324,"children":5325},{"class":1029,"line":182},[5326],{"type":993,"tag":1027,"props":5327,"children":5328},{"emptyLinePlaceholder":13},[5329],{"type":999,"value":1284},{"type":993,"tag":1027,"props":5331,"children":5332},{"class":1029,"line":191},[5333],{"type":993,"tag":1027,"props":5334,"children":5335},{"style":1033},[5336],{"type":999,"value":5337},"# Using comparison and arithmetic\n",{"type":993,"tag":1027,"props":5339,"children":5340},{"class":1029,"line":201},[5341,5346,5350,5354,5358],{"type":993,"tag":1027,"props":5342,"children":5343},{"style":1054},[5344],{"type":999,"value":5345},"score1 ",{"type":993,"tag":1027,"props":5347,"children":5348},{"style":1042},[5349],{"type":999,"value":1094},{"type":993,"tag":1027,"props":5351,"children":5352},{"style":1054},[5353],{"type":999,"value":5250},{"type":993,"tag":1027,"props":5355,"children":5356},{"style":1068},[5357],{"type":999,"value":2072},{"type":993,"tag":1027,"props":5359,"children":5360},{"style":1054},[5361],{"type":999,"value":2077},{"type":993,"tag":1027,"props":5363,"children":5364},{"class":1029,"line":210},[5365,5370,5374,5378,5383],{"type":993,"tag":1027,"props":5366,"children":5367},{"style":1054},[5368],{"type":999,"value":5369},"score2 ",{"type":993,"tag":1027,"props":5371,"children":5372},{"style":1042},[5373],{"type":999,"value":1094},{"type":993,"tag":1027,"props":5375,"children":5376},{"style":1054},[5377],{"type":999,"value":5250},{"type":993,"tag":1027,"props":5379,"children":5380},{"style":1068},[5381],{"type":999,"value":5382},"85",{"type":993,"tag":1027,"props":5384,"children":5385},{"style":1054},[5386],{"type":999,"value":2077},{"type":993,"tag":1027,"props":5388,"children":5389},{"class":1029,"line":219},[5390],{"type":993,"tag":1027,"props":5391,"children":5392},{"emptyLinePlaceholder":13},[5393],{"type":999,"value":1284},{"type":993,"tag":1027,"props":5395,"children":5396},{"class":1029,"line":228},[5397,5401,5405,5409,5414,5418,5423,5427,5431],{"type":993,"tag":1027,"props":5398,"children":5399},{"style":1068},[5400],{"type":999,"value":1309},{"type":993,"tag":1027,"props":5402,"children":5403},{"style":1054},[5404],{"type":999,"value":4027},{"type":993,"tag":1027,"props":5406,"children":5407},{"style":1042},[5408],{"type":999,"value":4150},{"type":993,"tag":1027,"props":5410,"children":5411},{"style":1273},[5412],{"type":999,"value":5413},"\"Score 1: ",{"type":993,"tag":1027,"props":5415,"children":5416},{"style":1068},[5417],{"type":999,"value":1832},{"type":993,"tag":1027,"props":5419,"children":5420},{"style":1054},[5421],{"type":999,"value":5422},"score1",{"type":993,"tag":1027,"props":5424,"children":5425},{"style":1068},[5426],{"type":999,"value":1710},{"type":993,"tag":1027,"props":5428,"children":5429},{"style":1273},[5430],{"type":999,"value":1695},{"type":993,"tag":1027,"props":5432,"children":5433},{"style":1054},[5434],{"type":999,"value":2077},{"type":993,"tag":1027,"props":5436,"children":5437},{"class":1029,"line":238},[5438,5442,5446,5450,5455,5459,5464,5468,5472],{"type":993,"tag":1027,"props":5439,"children":5440},{"style":1068},[5441],{"type":999,"value":1309},{"type":993,"tag":1027,"props":5443,"children":5444},{"style":1054},[5445],{"type":999,"value":4027},{"type":993,"tag":1027,"props":5447,"children":5448},{"style":1042},[5449],{"type":999,"value":4150},{"type":993,"tag":1027,"props":5451,"children":5452},{"style":1273},[5453],{"type":999,"value":5454},"\"Score 2: ",{"type":993,"tag":1027,"props":5456,"children":5457},{"style":1068},[5458],{"type":999,"value":1832},{"type":993,"tag":1027,"props":5460,"children":5461},{"style":1054},[5462],{"type":999,"value":5463},"score2",{"type":993,"tag":1027,"props":5465,"children":5466},{"style":1068},[5467],{"type":999,"value":1710},{"type":993,"tag":1027,"props":5469,"children":5470},{"style":1273},[5471],{"type":999,"value":1695},{"type":993,"tag":1027,"props":5473,"children":5474},{"style":1054},[5475],{"type":999,"value":2077},{"type":993,"tag":1027,"props":5477,"children":5478},{"class":1029,"line":247},[5479,5483,5487,5491,5496,5500,5504,5508,5513,5517,5521],{"type":993,"tag":1027,"props":5480,"children":5481},{"style":1068},[5482],{"type":999,"value":1309},{"type":993,"tag":1027,"props":5484,"children":5485},{"style":1054},[5486],{"type":999,"value":4027},{"type":993,"tag":1027,"props":5488,"children":5489},{"style":1042},[5490],{"type":999,"value":4150},{"type":993,"tag":1027,"props":5492,"children":5493},{"style":1273},[5494],{"type":999,"value":5495},"\"Equal? ",{"type":993,"tag":1027,"props":5497,"children":5498},{"style":1068},[5499],{"type":999,"value":1832},{"type":993,"tag":1027,"props":5501,"children":5502},{"style":1054},[5503],{"type":999,"value":5345},{"type":993,"tag":1027,"props":5505,"children":5506},{"style":1042},[5507],{"type":999,"value":4322},{"type":993,"tag":1027,"props":5509,"children":5510},{"style":1054},[5511],{"type":999,"value":5512}," score2",{"type":993,"tag":1027,"props":5514,"children":5515},{"style":1068},[5516],{"type":999,"value":1710},{"type":993,"tag":1027,"props":5518,"children":5519},{"style":1273},[5520],{"type":999,"value":1695},{"type":993,"tag":1027,"props":5522,"children":5523},{"style":1054},[5524],{"type":999,"value":2077},{"type":993,"tag":1027,"props":5526,"children":5527},{"class":1029,"line":256},[5528,5532,5536,5540,5545,5549,5553,5557,5561,5565,5569],{"type":993,"tag":1027,"props":5529,"children":5530},{"style":1068},[5531],{"type":999,"value":1309},{"type":993,"tag":1027,"props":5533,"children":5534},{"style":1054},[5535],{"type":999,"value":4027},{"type":993,"tag":1027,"props":5537,"children":5538},{"style":1042},[5539],{"type":999,"value":4150},{"type":993,"tag":1027,"props":5541,"children":5542},{"style":1273},[5543],{"type":999,"value":5544},"\"Score 1 higher? ",{"type":993,"tag":1027,"props":5546,"children":5547},{"style":1068},[5548],{"type":999,"value":1832},{"type":993,"tag":1027,"props":5550,"children":5551},{"style":1054},[5552],{"type":999,"value":5345},{"type":993,"tag":1027,"props":5554,"children":5555},{"style":1042},[5556],{"type":999,"value":1780},{"type":993,"tag":1027,"props":5558,"children":5559},{"style":1054},[5560],{"type":999,"value":5512},{"type":993,"tag":1027,"props":5562,"children":5563},{"style":1068},[5564],{"type":999,"value":1710},{"type":993,"tag":1027,"props":5566,"children":5567},{"style":1273},[5568],{"type":999,"value":1695},{"type":993,"tag":1027,"props":5570,"children":5571},{"style":1054},[5572],{"type":999,"value":2077},{"type":993,"tag":1027,"props":5574,"children":5575},{"class":1029,"line":265},[5576,5580,5584,5588,5593,5597,5601,5605,5609,5613,5617],{"type":993,"tag":1027,"props":5577,"children":5578},{"style":1068},[5579],{"type":999,"value":1309},{"type":993,"tag":1027,"props":5581,"children":5582},{"style":1054},[5583],{"type":999,"value":4027},{"type":993,"tag":1027,"props":5585,"children":5586},{"style":1042},[5587],{"type":999,"value":4150},{"type":993,"tag":1027,"props":5589,"children":5590},{"style":1273},[5591],{"type":999,"value":5592},"\"Combined: ",{"type":993,"tag":1027,"props":5594,"children":5595},{"style":1068},[5596],{"type":999,"value":1832},{"type":993,"tag":1027,"props":5598,"children":5599},{"style":1054},[5600],{"type":999,"value":5345},{"type":993,"tag":1027,"props":5602,"children":5603},{"style":1042},[5604],{"type":999,"value":4388},{"type":993,"tag":1027,"props":5606,"children":5607},{"style":1054},[5608],{"type":999,"value":5512},{"type":993,"tag":1027,"props":5610,"children":5611},{"style":1068},[5612],{"type":999,"value":1710},{"type":993,"tag":1027,"props":5614,"children":5615},{"style":1273},[5616],{"type":999,"value":1695},{"type":993,"tag":1027,"props":5618,"children":5619},{"style":1054},[5620],{"type":999,"value":2077},{"type":993,"tag":1027,"props":5622,"children":5623},{"class":1029,"line":274},[5624,5628,5632,5636,5641,5645,5649,5653,5657,5661,5665],{"type":993,"tag":1027,"props":5625,"children":5626},{"style":1068},[5627],{"type":999,"value":1309},{"type":993,"tag":1027,"props":5629,"children":5630},{"style":1054},[5631],{"type":999,"value":4027},{"type":993,"tag":1027,"props":5633,"children":5634},{"style":1042},[5635],{"type":999,"value":4150},{"type":993,"tag":1027,"props":5637,"children":5638},{"style":1273},[5639],{"type":999,"value":5640},"\"Difference: ",{"type":993,"tag":1027,"props":5642,"children":5643},{"style":1068},[5644],{"type":999,"value":1832},{"type":993,"tag":1027,"props":5646,"children":5647},{"style":1054},[5648],{"type":999,"value":5345},{"type":993,"tag":1027,"props":5650,"children":5651},{"style":1042},[5652],{"type":999,"value":4406},{"type":993,"tag":1027,"props":5654,"children":5655},{"style":1054},[5656],{"type":999,"value":5512},{"type":993,"tag":1027,"props":5658,"children":5659},{"style":1068},[5660],{"type":999,"value":1710},{"type":993,"tag":1027,"props":5662,"children":5663},{"style":1273},[5664],{"type":999,"value":1695},{"type":993,"tag":1027,"props":5666,"children":5667},{"style":1054},[5668],{"type":999,"value":2077},{"type":993,"tag":1395,"props":5670,"children":5673},{"title":5671,"type":5672},"Method Naming Guidelines","warning",[5674,5682,5760,5768,5840,5848,5872,5880],{"type":993,"tag":1002,"props":5675,"children":5676},{},[5677],{"type":993,"tag":1405,"props":5678,"children":5679},{},[5680],{"type":999,"value":5681},"Action Methods:",{"type":993,"tag":1411,"props":5683,"children":5684},{},[5685,5717,5735],{"type":993,"tag":1415,"props":5686,"children":5687},{},[5688,5690,5696,5697,5703,5704,5710,5711],{"type":999,"value":5689},"Use verbs: ",{"type":993,"tag":1023,"props":5691,"children":5693},{"className":5692},[],[5694],{"type":999,"value":5695},"add()",{"type":999,"value":1488},{"type":993,"tag":1023,"props":5698,"children":5700},{"className":5699},[],[5701],{"type":999,"value":5702},"remove()",{"type":999,"value":1488},{"type":993,"tag":1023,"props":5705,"children":5707},{"className":5706},[],[5708],{"type":999,"value":5709},"update()",{"type":999,"value":1488},{"type":993,"tag":1023,"props":5712,"children":5714},{"className":5713},[],[5715],{"type":999,"value":5716},"save()",{"type":993,"tag":1415,"props":5718,"children":5719},{},[5720,5722,5728,5730],{"type":999,"value":5721},"Be specific: ",{"type":993,"tag":1023,"props":5723,"children":5725},{"className":5724},[],[5726],{"type":999,"value":5727},"add_item()",{"type":999,"value":5729}," vs. ",{"type":993,"tag":1023,"props":5731,"children":5733},{"className":5732},[],[5734],{"type":999,"value":5695},{"type":993,"tag":1415,"props":5736,"children":5737},{},[5738,5740,5746,5747,5753,5754],{"type":999,"value":5739},"Use consistent patterns: ",{"type":993,"tag":1023,"props":5741,"children":5743},{"className":5742},[],[5744],{"type":999,"value":5745},"get_*()",{"type":999,"value":1488},{"type":993,"tag":1023,"props":5748,"children":5750},{"className":5749},[],[5751],{"type":999,"value":5752},"set_*()",{"type":999,"value":1488},{"type":993,"tag":1023,"props":5755,"children":5757},{"className":5756},[],[5758],{"type":999,"value":5759},"is_*()",{"type":993,"tag":1002,"props":5761,"children":5762},{},[5763],{"type":993,"tag":1405,"props":5764,"children":5765},{},[5766],{"type":999,"value":5767},"Query Methods:",{"type":993,"tag":1411,"props":5769,"children":5770},{},[5771,5803,5822],{"type":993,"tag":1415,"props":5772,"children":5773},{},[5774,5776,5782,5783,5789,5790,5796,5797],{"type":999,"value":5775},"Start with ",{"type":993,"tag":1023,"props":5777,"children":5779},{"className":5778},[],[5780],{"type":999,"value":5781},"get_",{"type":999,"value":1488},{"type":993,"tag":1023,"props":5784,"children":5786},{"className":5785},[],[5787],{"type":999,"value":5788},"is_",{"type":999,"value":1488},{"type":993,"tag":1023,"props":5791,"children":5793},{"className":5792},[],[5794],{"type":999,"value":5795},"has_",{"type":999,"value":1488},{"type":993,"tag":1023,"props":5798,"children":5800},{"className":5799},[],[5801],{"type":999,"value":5802},"can_",{"type":993,"tag":1415,"props":5804,"children":5805},{},[5806,5808,5813,5814,5820],{"type":999,"value":5807},"Return boolean for ",{"type":993,"tag":1023,"props":5809,"children":5811},{"className":5810},[],[5812],{"type":999,"value":5759},{"type":999,"value":4481},{"type":993,"tag":1023,"props":5815,"children":5817},{"className":5816},[],[5818],{"type":999,"value":5819},"has_*()",{"type":999,"value":5821}," methods",{"type":993,"tag":1415,"props":5823,"children":5824},{},[5825,5827,5833,5834],{"type":999,"value":5826},"Use descriptive names: ",{"type":993,"tag":1023,"props":5828,"children":5830},{"className":5829},[],[5831],{"type":999,"value":5832},"is_empty()",{"type":999,"value":1488},{"type":993,"tag":1023,"props":5835,"children":5837},{"className":5836},[],[5838],{"type":999,"value":5839},"has_items()",{"type":993,"tag":1002,"props":5841,"children":5842},{},[5843],{"type":993,"tag":1405,"props":5844,"children":5845},{},[5846],{"type":999,"value":5847},"Private Methods:",{"type":993,"tag":1411,"props":5849,"children":5850},{},[5851,5862,5867],{"type":993,"tag":1415,"props":5852,"children":5853},{},[5854,5856],{"type":999,"value":5855},"Start with underscore: ",{"type":993,"tag":1023,"props":5857,"children":5859},{"className":5858},[],[5860],{"type":999,"value":5861},"_internal_method()",{"type":993,"tag":1415,"props":5863,"children":5864},{},[5865],{"type":999,"value":5866},"Indicate internal use only",{"type":993,"tag":1415,"props":5868,"children":5869},{},[5870],{"type":999,"value":5871},"Don't call from outside the class",{"type":993,"tag":1002,"props":5873,"children":5874},{},[5875],{"type":993,"tag":1405,"props":5876,"children":5877},{},[5878],{"type":999,"value":5879},"Avoid:",{"type":993,"tag":1411,"props":5881,"children":5882},{},[5883,5908,5926],{"type":993,"tag":1415,"props":5884,"children":5885},{},[5886,5888,5894,5895,5901,5902],{"type":999,"value":5887},"Generic names: ",{"type":993,"tag":1023,"props":5889,"children":5891},{"className":5890},[],[5892],{"type":999,"value":5893},"do()",{"type":999,"value":1488},{"type":993,"tag":1023,"props":5896,"children":5898},{"className":5897},[],[5899],{"type":999,"value":5900},"handle()",{"type":999,"value":1488},{"type":993,"tag":1023,"props":5903,"children":5905},{"className":5904},[],[5906],{"type":999,"value":5907},"process()",{"type":993,"tag":1415,"props":5909,"children":5910},{},[5911,5913,5919,5920],{"type":999,"value":5912},"Abbreviations: ",{"type":993,"tag":1023,"props":5914,"children":5916},{"className":5915},[],[5917],{"type":999,"value":5918},"calc()",{"type":999,"value":5729},{"type":993,"tag":1023,"props":5921,"children":5923},{"className":5922},[],[5924],{"type":999,"value":5925},"calculate()",{"type":993,"tag":1415,"props":5927,"children":5928},{},[5929,5931,5936,5937],{"type":999,"value":5930},"Inconsistent patterns: mixing ",{"type":993,"tag":1023,"props":5932,"children":5934},{"className":5933},[],[5935],{"type":999,"value":5745},{"type":999,"value":4481},{"type":993,"tag":1023,"props":5938,"children":5940},{"className":5939},[],[5941],{"type":999,"value":5942},"fetch_*()",{"type":993,"tag":1375,"props":5944,"children":5946},{"id":5945},"essential-method-patterns",[5947],{"type":999,"value":5948},"Essential Method Patterns",{"type":993,"tag":1002,"props":5950,"children":5951},{},[5952],{"type":999,"value":5953},"Common method patterns solve recurring design problems and create consistent interfaces across different classes.",{"type":993,"tag":5955,"props":5956,"children":5957},"table",{},[5958,5982],{"type":993,"tag":5959,"props":5960,"children":5961},"thead",{},[5962],{"type":993,"tag":5963,"props":5964,"children":5965},"tr",{},[5966,5972,5977],{"type":993,"tag":5967,"props":5968,"children":5969},"th",{},[5970],{"type":999,"value":5971},"Pattern",{"type":993,"tag":5967,"props":5973,"children":5974},{},[5975],{"type":999,"value":5976},"Purpose",{"type":993,"tag":5967,"props":5978,"children":5979},{},[5980],{"type":999,"value":5981},"Example",{"type":993,"tag":5983,"props":5984,"children":5985},"tbody",{},[5986,6012,6037,6069,6094],{"type":993,"tag":5963,"props":5987,"children":5988},{},[5989,5998,6003],{"type":993,"tag":5990,"props":5991,"children":5992},"td",{},[5993],{"type":993,"tag":1405,"props":5994,"children":5995},{},[5996],{"type":999,"value":5997},"Factory Methods",{"type":993,"tag":5990,"props":5999,"children":6000},{},[6001],{"type":999,"value":6002},"Create objects with specific configurations",{"type":993,"tag":5990,"props":6004,"children":6005},{},[6006],{"type":993,"tag":1023,"props":6007,"children":6009},{"className":6008},[],[6010],{"type":999,"value":6011},"create_admin_user()",{"type":993,"tag":5963,"props":6013,"children":6014},{},[6015,6023,6028],{"type":993,"tag":5990,"props":6016,"children":6017},{},[6018],{"type":993,"tag":1405,"props":6019,"children":6020},{},[6021],{"type":999,"value":6022},"Validation Methods",{"type":993,"tag":5990,"props":6024,"children":6025},{},[6026],{"type":999,"value":6027},"Check object state or input validity",{"type":993,"tag":5990,"props":6029,"children":6030},{},[6031],{"type":993,"tag":1023,"props":6032,"children":6034},{"className":6033},[],[6035],{"type":999,"value":6036},"is_valid_email()",{"type":993,"tag":5963,"props":6038,"children":6039},{},[6040,6048,6053],{"type":993,"tag":5990,"props":6041,"children":6042},{},[6043],{"type":993,"tag":1405,"props":6044,"children":6045},{},[6046],{"type":999,"value":6047},"Conversion Methods",{"type":993,"tag":5990,"props":6049,"children":6050},{},[6051],{"type":999,"value":6052},"Transform object to different formats",{"type":993,"tag":5990,"props":6054,"children":6055},{},[6056,6062,6063],{"type":993,"tag":1023,"props":6057,"children":6059},{"className":6058},[],[6060],{"type":999,"value":6061},"to_json()",{"type":999,"value":1488},{"type":993,"tag":1023,"props":6064,"children":6066},{"className":6065},[],[6067],{"type":999,"value":6068},"to_dict()",{"type":993,"tag":5963,"props":6070,"children":6071},{},[6072,6080,6085],{"type":993,"tag":5990,"props":6073,"children":6074},{},[6075],{"type":993,"tag":1405,"props":6076,"children":6077},{},[6078],{"type":999,"value":6079},"Utility Methods",{"type":993,"tag":5990,"props":6081,"children":6082},{},[6083],{"type":999,"value":6084},"Provide helper functionality",{"type":993,"tag":5990,"props":6086,"children":6087},{},[6088],{"type":993,"tag":1023,"props":6089,"children":6091},{"className":6090},[],[6092],{"type":999,"value":6093},"calculate_age()",{"type":993,"tag":5963,"props":6095,"children":6096},{},[6097,6105,6110],{"type":993,"tag":5990,"props":6098,"children":6099},{},[6100],{"type":993,"tag":1405,"props":6101,"children":6102},{},[6103],{"type":999,"value":6104},"Event Methods",{"type":993,"tag":5990,"props":6106,"children":6107},{},[6108],{"type":999,"value":6109},"Handle state changes or notifications",{"type":993,"tag":5990,"props":6111,"children":6112},{},[6113],{"type":993,"tag":1023,"props":6114,"children":6116},{"className":6115},[],[6117],{"type":999,"value":6118},"on_item_added()",{"type":993,"tag":1375,"props":6120,"children":6122},{"id":6121},"method-organization-and-best-practices",[6123],{"type":999,"value":6124},"🌟 Method Organization and Best Practices",{"type":993,"tag":1002,"props":6126,"children":6127},{},[6128],{"type":999,"value":6129},"Well-organized methods make classes easier to understand, test, and maintain. Following established patterns helps create professional, reusable code.",{"type":993,"tag":1534,"props":6131,"children":6133},{"id":6132},"method-categories",[6134],{"type":999,"value":6135},"Method Categories",{"type":993,"tag":1002,"props":6137,"children":6138},{},[6139],{"type":999,"value":6140},"Organize methods into logical categories based on their purpose and responsibility.",{"type":993,"tag":1013,"props":6142,"children":6143},{},[6144],{"type":993,"tag":1017,"props":6145,"children":6147},{"className":1019,"code":6146,"language":6,"meta":8,"style":8},"class TaskManager:\n    def __init__(self):\n        self.tasks = []\n        self.completed_count = 0\n    \n    # Creation/Modification methods\n    def add_task(self, description, priority=\"medium\"):\n        task = {\n            'id': len(self.tasks) + 1,\n            'description': description,\n            'priority': priority,\n            'completed': False\n        }\n        self.tasks.append(task)\n        return f\"Added task {task['id']}: {description}\"\n    \n    def complete_task(self, task_id):\n        for task in self.tasks:\n            if task['id'] == task_id and not task['completed']:\n                task['completed'] = True\n                self.completed_count += 1\n                return f\"Completed task {task_id}\"\n        return \"Task not found or already completed\"\n    \n    # Query methods\n    def get_pending_tasks(self):\n        return [task for task in self.tasks if not task['completed']]\n    \n    def get_completed_tasks(self):\n        return [task for task in self.tasks if task['completed']]\n    \n    def get_task_count(self):\n        return len(self.tasks)\n    \n    # Display methods\n    def show_summary(self):\n        pending = len(self.get_pending_tasks())\n        return f\"Tasks: {pending} pending, {self.completed_count} completed\"\n\n# Well-organized method usage\nmanager = TaskManager()\nmanager.add_task(\"Learn Python\", \"high\")\nmanager.add_task(\"Buy groceries\", \"low\")\nmanager.complete_task(1)\n\nprint(manager.show_summary())\nprint(f\"Pending tasks: {len(manager.get_pending_tasks())}\")\n",[6148],{"type":993,"tag":1023,"props":6149,"children":6150},{"__ignoreMap":8},[6151,6167,6182,6202,6222,6229,6237,6267,6283,6326,6339,6352,6369,6376,6388,6447,6454,6471,6496,6548,6573,6594,6628,6640,6647,6655,6671,6724,6731,6747,6794,6801,6817,6842,6849,6857,6873,6902,6954,6961,6969,6986,7012,7037,7053,7060,7072],{"type":993,"tag":1027,"props":6152,"children":6153},{"class":1029,"line":12},[6154,6158,6163],{"type":993,"tag":1027,"props":6155,"children":6156},{"style":1042},[6157],{"type":999,"value":1045},{"type":993,"tag":1027,"props":6159,"children":6160},{"style":1048},[6161],{"type":999,"value":6162}," TaskManager",{"type":993,"tag":1027,"props":6164,"children":6165},{"style":1054},[6166],{"type":999,"value":1057},{"type":993,"tag":1027,"props":6168,"children":6169},{"class":1029,"line":27},[6170,6174,6178],{"type":993,"tag":1027,"props":6171,"children":6172},{"style":1042},[6173],{"type":999,"value":1065},{"type":993,"tag":1027,"props":6175,"children":6176},{"style":1068},[6177],{"type":999,"value":1071},{"type":993,"tag":1027,"props":6179,"children":6180},{"style":1054},[6181],{"type":999,"value":1076},{"type":993,"tag":1027,"props":6183,"children":6184},{"class":1029,"line":36},[6185,6189,6194,6198],{"type":993,"tag":1027,"props":6186,"children":6187},{"style":1068},[6188],{"type":999,"value":1084},{"type":993,"tag":1027,"props":6190,"children":6191},{"style":1054},[6192],{"type":999,"value":6193},".tasks ",{"type":993,"tag":1027,"props":6195,"children":6196},{"style":1042},[6197],{"type":999,"value":1094},{"type":993,"tag":1027,"props":6199,"children":6200},{"style":1054},[6201],{"type":999,"value":2296},{"type":993,"tag":1027,"props":6203,"children":6204},{"class":1029,"line":45},[6205,6209,6214,6218],{"type":993,"tag":1027,"props":6206,"children":6207},{"style":1068},[6208],{"type":999,"value":1084},{"type":993,"tag":1027,"props":6210,"children":6211},{"style":1054},[6212],{"type":999,"value":6213},".completed_count ",{"type":993,"tag":1027,"props":6215,"children":6216},{"style":1042},[6217],{"type":999,"value":1094},{"type":993,"tag":1027,"props":6219,"children":6220},{"style":1068},[6221],{"type":999,"value":1099},{"type":993,"tag":1027,"props":6223,"children":6224},{"class":1029,"line":54},[6225],{"type":993,"tag":1027,"props":6226,"children":6227},{"style":1054},[6228],{"type":999,"value":1107},{"type":993,"tag":1027,"props":6230,"children":6231},{"class":1029,"line":63},[6232],{"type":993,"tag":1027,"props":6233,"children":6234},{"style":1033},[6235],{"type":999,"value":6236},"    # Creation/Modification methods\n",{"type":993,"tag":1027,"props":6238,"children":6239},{"class":1029,"line":72},[6240,6244,6249,6254,6258,6263],{"type":993,"tag":1027,"props":6241,"children":6242},{"style":1042},[6243],{"type":999,"value":1065},{"type":993,"tag":1027,"props":6245,"children":6246},{"style":1048},[6247],{"type":999,"value":6248}," add_task",{"type":993,"tag":1027,"props":6250,"children":6251},{"style":1054},[6252],{"type":999,"value":6253},"(self, description, priority",{"type":993,"tag":1027,"props":6255,"children":6256},{"style":1042},[6257],{"type":999,"value":1094},{"type":993,"tag":1027,"props":6259,"children":6260},{"style":1273},[6261],{"type":999,"value":6262},"\"medium\"",{"type":993,"tag":1027,"props":6264,"children":6265},{"style":1054},[6266],{"type":999,"value":1607},{"type":993,"tag":1027,"props":6268,"children":6269},{"class":1029,"line":81},[6270,6275,6279],{"type":993,"tag":1027,"props":6271,"children":6272},{"style":1054},[6273],{"type":999,"value":6274},"        task ",{"type":993,"tag":1027,"props":6276,"children":6277},{"style":1042},[6278],{"type":999,"value":1094},{"type":993,"tag":1027,"props":6280,"children":6281},{"style":1054},[6282],{"type":999,"value":3970},{"type":993,"tag":1027,"props":6284,"children":6285},{"class":1029,"line":91},[6286,6291,6295,6299,6303,6307,6312,6316,6321],{"type":993,"tag":1027,"props":6287,"children":6288},{"style":1273},[6289],{"type":999,"value":6290},"            'id'",{"type":993,"tag":1027,"props":6292,"children":6293},{"style":1054},[6294],{"type":999,"value":3996},{"type":993,"tag":1027,"props":6296,"children":6297},{"style":1068},[6298],{"type":999,"value":4022},{"type":993,"tag":1027,"props":6300,"children":6301},{"style":1054},[6302],{"type":999,"value":4027},{"type":993,"tag":1027,"props":6304,"children":6305},{"style":1068},[6306],{"type":999,"value":1391},{"type":993,"tag":1027,"props":6308,"children":6309},{"style":1054},[6310],{"type":999,"value":6311},".tasks) ",{"type":993,"tag":1027,"props":6313,"children":6314},{"style":1042},[6315],{"type":999,"value":4388},{"type":993,"tag":1027,"props":6317,"children":6318},{"style":1068},[6319],{"type":999,"value":6320}," 1",{"type":993,"tag":1027,"props":6322,"children":6323},{"style":1054},[6324],{"type":999,"value":6325},",\n",{"type":993,"tag":1027,"props":6327,"children":6328},{"class":1029,"line":100},[6329,6334],{"type":993,"tag":1027,"props":6330,"children":6331},{"style":1273},[6332],{"type":999,"value":6333},"            'description'",{"type":993,"tag":1027,"props":6335,"children":6336},{"style":1054},[6337],{"type":999,"value":6338},": description,\n",{"type":993,"tag":1027,"props":6340,"children":6341},{"class":1029,"line":109},[6342,6347],{"type":993,"tag":1027,"props":6343,"children":6344},{"style":1273},[6345],{"type":999,"value":6346},"            'priority'",{"type":993,"tag":1027,"props":6348,"children":6349},{"style":1054},[6350],{"type":999,"value":6351},": priority,\n",{"type":993,"tag":1027,"props":6353,"children":6354},{"class":1029,"line":118},[6355,6360,6364],{"type":993,"tag":1027,"props":6356,"children":6357},{"style":1273},[6358],{"type":999,"value":6359},"            'completed'",{"type":993,"tag":1027,"props":6361,"children":6362},{"style":1054},[6363],{"type":999,"value":3996},{"type":993,"tag":1027,"props":6365,"children":6366},{"style":1068},[6367],{"type":999,"value":6368},"False\n",{"type":993,"tag":1027,"props":6370,"children":6371},{"class":1029,"line":127},[6372],{"type":993,"tag":1027,"props":6373,"children":6374},{"style":1054},[6375],{"type":999,"value":4044},{"type":993,"tag":1027,"props":6377,"children":6378},{"class":1029,"line":136},[6379,6383],{"type":993,"tag":1027,"props":6380,"children":6381},{"style":1068},[6382],{"type":999,"value":1084},{"type":993,"tag":1027,"props":6384,"children":6385},{"style":1054},[6386],{"type":999,"value":6387},".tasks.append(task)\n",{"type":993,"tag":1027,"props":6389,"children":6390},{"class":1029,"line":146},[6391,6395,6399,6404,6408,6413,6418,6422,6426,6430,6434,6439,6443],{"type":993,"tag":1027,"props":6392,"children":6393},{"style":1042},[6394],{"type":999,"value":1153},{"type":993,"tag":1027,"props":6396,"children":6397},{"style":1042},[6398],{"type":999,"value":1690},{"type":993,"tag":1027,"props":6400,"children":6401},{"style":1273},[6402],{"type":999,"value":6403},"\"Added task ",{"type":993,"tag":1027,"props":6405,"children":6406},{"style":1068},[6407],{"type":999,"value":1832},{"type":993,"tag":1027,"props":6409,"children":6410},{"style":1054},[6411],{"type":999,"value":6412},"task[",{"type":993,"tag":1027,"props":6414,"children":6415},{"style":1273},[6416],{"type":999,"value":6417},"'id'",{"type":993,"tag":1027,"props":6419,"children":6420},{"style":1054},[6421],{"type":999,"value":3910},{"type":993,"tag":1027,"props":6423,"children":6424},{"style":1068},[6425],{"type":999,"value":1710},{"type":993,"tag":1027,"props":6427,"children":6428},{"style":1273},[6429],{"type":999,"value":3996},{"type":993,"tag":1027,"props":6431,"children":6432},{"style":1068},[6433],{"type":999,"value":1832},{"type":993,"tag":1027,"props":6435,"children":6436},{"style":1054},[6437],{"type":999,"value":6438},"description",{"type":993,"tag":1027,"props":6440,"children":6441},{"style":1068},[6442],{"type":999,"value":1710},{"type":993,"tag":1027,"props":6444,"children":6445},{"style":1273},[6446],{"type":999,"value":1733},{"type":993,"tag":1027,"props":6448,"children":6449},{"class":1029,"line":155},[6450],{"type":993,"tag":1027,"props":6451,"children":6452},{"style":1054},[6453],{"type":999,"value":1107},{"type":993,"tag":1027,"props":6455,"children":6456},{"class":1029,"line":164},[6457,6461,6466],{"type":993,"tag":1027,"props":6458,"children":6459},{"style":1042},[6460],{"type":999,"value":1065},{"type":993,"tag":1027,"props":6462,"children":6463},{"style":1048},[6464],{"type":999,"value":6465}," complete_task",{"type":993,"tag":1027,"props":6467,"children":6468},{"style":1054},[6469],{"type":999,"value":6470},"(self, task_id):\n",{"type":993,"tag":1027,"props":6472,"children":6473},{"class":1029,"line":173},[6474,6478,6483,6487,6491],{"type":993,"tag":1027,"props":6475,"children":6476},{"style":1042},[6477],{"type":999,"value":3679},{"type":993,"tag":1027,"props":6479,"children":6480},{"style":1054},[6481],{"type":999,"value":6482}," task ",{"type":993,"tag":1027,"props":6484,"children":6485},{"style":1042},[6486],{"type":999,"value":3493},{"type":993,"tag":1027,"props":6488,"children":6489},{"style":1068},[6490],{"type":999,"value":1158},{"type":993,"tag":1027,"props":6492,"children":6493},{"style":1054},[6494],{"type":999,"value":6495},".tasks:\n",{"type":993,"tag":1027,"props":6497,"children":6498},{"class":1029,"line":182},[6499,6504,6509,6513,6517,6521,6526,6531,6535,6539,6544],{"type":993,"tag":1027,"props":6500,"children":6501},{"style":1042},[6502],{"type":999,"value":6503},"            if",{"type":993,"tag":1027,"props":6505,"children":6506},{"style":1054},[6507],{"type":999,"value":6508}," task[",{"type":993,"tag":1027,"props":6510,"children":6511},{"style":1273},[6512],{"type":999,"value":6417},{"type":993,"tag":1027,"props":6514,"children":6515},{"style":1054},[6516],{"type":999,"value":3524},{"type":993,"tag":1027,"props":6518,"children":6519},{"style":1042},[6520],{"type":999,"value":4322},{"type":993,"tag":1027,"props":6522,"children":6523},{"style":1054},[6524],{"type":999,"value":6525}," task_id ",{"type":993,"tag":1027,"props":6527,"children":6528},{"style":1042},[6529],{"type":999,"value":6530},"and",{"type":993,"tag":1027,"props":6532,"children":6533},{"style":1042},[6534],{"type":999,"value":3786},{"type":993,"tag":1027,"props":6536,"children":6537},{"style":1054},[6538],{"type":999,"value":6508},{"type":993,"tag":1027,"props":6540,"children":6541},{"style":1273},[6542],{"type":999,"value":6543},"'completed'",{"type":993,"tag":1027,"props":6545,"children":6546},{"style":1054},[6547],{"type":999,"value":4224},{"type":993,"tag":1027,"props":6549,"children":6550},{"class":1029,"line":191},[6551,6556,6560,6564,6568],{"type":993,"tag":1027,"props":6552,"children":6553},{"style":1054},[6554],{"type":999,"value":6555},"                task[",{"type":993,"tag":1027,"props":6557,"children":6558},{"style":1273},[6559],{"type":999,"value":6543},{"type":993,"tag":1027,"props":6561,"children":6562},{"style":1054},[6563],{"type":999,"value":3524},{"type":993,"tag":1027,"props":6565,"children":6566},{"style":1042},[6567],{"type":999,"value":1094},{"type":993,"tag":1027,"props":6569,"children":6570},{"style":1068},[6571],{"type":999,"value":6572}," True\n",{"type":993,"tag":1027,"props":6574,"children":6575},{"class":1029,"line":201},[6576,6581,6585,6589],{"type":993,"tag":1027,"props":6577,"children":6578},{"style":1068},[6579],{"type":999,"value":6580},"                self",{"type":993,"tag":1027,"props":6582,"children":6583},{"style":1054},[6584],{"type":999,"value":6213},{"type":993,"tag":1027,"props":6586,"children":6587},{"style":1042},[6588],{"type":999,"value":1140},{"type":993,"tag":1027,"props":6590,"children":6591},{"style":1068},[6592],{"type":999,"value":6593}," 1\n",{"type":993,"tag":1027,"props":6595,"children":6596},{"class":1029,"line":210},[6597,6602,6606,6611,6615,6620,6624],{"type":993,"tag":1027,"props":6598,"children":6599},{"style":1042},[6600],{"type":999,"value":6601},"                return",{"type":993,"tag":1027,"props":6603,"children":6604},{"style":1042},[6605],{"type":999,"value":1690},{"type":993,"tag":1027,"props":6607,"children":6608},{"style":1273},[6609],{"type":999,"value":6610},"\"Completed task ",{"type":993,"tag":1027,"props":6612,"children":6613},{"style":1068},[6614],{"type":999,"value":1832},{"type":993,"tag":1027,"props":6616,"children":6617},{"style":1054},[6618],{"type":999,"value":6619},"task_id",{"type":993,"tag":1027,"props":6621,"children":6622},{"style":1068},[6623],{"type":999,"value":1710},{"type":993,"tag":1027,"props":6625,"children":6626},{"style":1273},[6627],{"type":999,"value":1733},{"type":993,"tag":1027,"props":6629,"children":6630},{"class":1029,"line":219},[6631,6635],{"type":993,"tag":1027,"props":6632,"children":6633},{"style":1042},[6634],{"type":999,"value":1153},{"type":993,"tag":1027,"props":6636,"children":6637},{"style":1273},[6638],{"type":999,"value":6639}," \"Task not found or already completed\"\n",{"type":993,"tag":1027,"props":6641,"children":6642},{"class":1029,"line":228},[6643],{"type":993,"tag":1027,"props":6644,"children":6645},{"style":1054},[6646],{"type":999,"value":1107},{"type":993,"tag":1027,"props":6648,"children":6649},{"class":1029,"line":238},[6650],{"type":993,"tag":1027,"props":6651,"children":6652},{"style":1033},[6653],{"type":999,"value":6654},"    # Query methods\n",{"type":993,"tag":1027,"props":6656,"children":6657},{"class":1029,"line":247},[6658,6662,6667],{"type":993,"tag":1027,"props":6659,"children":6660},{"style":1042},[6661],{"type":999,"value":1065},{"type":993,"tag":1027,"props":6663,"children":6664},{"style":1048},[6665],{"type":999,"value":6666}," get_pending_tasks",{"type":993,"tag":1027,"props":6668,"children":6669},{"style":1054},[6670],{"type":999,"value":1076},{"type":993,"tag":1027,"props":6672,"children":6673},{"class":1029,"line":256},[6674,6678,6683,6687,6691,6695,6699,6703,6707,6711,6715,6719],{"type":993,"tag":1027,"props":6675,"children":6676},{"style":1042},[6677],{"type":999,"value":1153},{"type":993,"tag":1027,"props":6679,"children":6680},{"style":1054},[6681],{"type":999,"value":6682}," [task ",{"type":993,"tag":1027,"props":6684,"children":6685},{"style":1042},[6686],{"type":999,"value":4201},{"type":993,"tag":1027,"props":6688,"children":6689},{"style":1054},[6690],{"type":999,"value":6482},{"type":993,"tag":1027,"props":6692,"children":6693},{"style":1042},[6694],{"type":999,"value":3493},{"type":993,"tag":1027,"props":6696,"children":6697},{"style":1068},[6698],{"type":999,"value":1158},{"type":993,"tag":1027,"props":6700,"children":6701},{"style":1054},[6702],{"type":999,"value":6193},{"type":993,"tag":1027,"props":6704,"children":6705},{"style":1042},[6706],{"type":999,"value":2457},{"type":993,"tag":1027,"props":6708,"children":6709},{"style":1042},[6710],{"type":999,"value":3786},{"type":993,"tag":1027,"props":6712,"children":6713},{"style":1054},[6714],{"type":999,"value":6508},{"type":993,"tag":1027,"props":6716,"children":6717},{"style":1273},[6718],{"type":999,"value":6543},{"type":993,"tag":1027,"props":6720,"children":6721},{"style":1054},[6722],{"type":999,"value":6723},"]]\n",{"type":993,"tag":1027,"props":6725,"children":6726},{"class":1029,"line":265},[6727],{"type":993,"tag":1027,"props":6728,"children":6729},{"style":1054},[6730],{"type":999,"value":1107},{"type":993,"tag":1027,"props":6732,"children":6733},{"class":1029,"line":274},[6734,6738,6743],{"type":993,"tag":1027,"props":6735,"children":6736},{"style":1042},[6737],{"type":999,"value":1065},{"type":993,"tag":1027,"props":6739,"children":6740},{"style":1048},[6741],{"type":999,"value":6742}," get_completed_tasks",{"type":993,"tag":1027,"props":6744,"children":6745},{"style":1054},[6746],{"type":999,"value":1076},{"type":993,"tag":1027,"props":6748,"children":6749},{"class":1029,"line":284},[6750,6754,6758,6762,6766,6770,6774,6778,6782,6786,6790],{"type":993,"tag":1027,"props":6751,"children":6752},{"style":1042},[6753],{"type":999,"value":1153},{"type":993,"tag":1027,"props":6755,"children":6756},{"style":1054},[6757],{"type":999,"value":6682},{"type":993,"tag":1027,"props":6759,"children":6760},{"style":1042},[6761],{"type":999,"value":4201},{"type":993,"tag":1027,"props":6763,"children":6764},{"style":1054},[6765],{"type":999,"value":6482},{"type":993,"tag":1027,"props":6767,"children":6768},{"style":1042},[6769],{"type":999,"value":3493},{"type":993,"tag":1027,"props":6771,"children":6772},{"style":1068},[6773],{"type":999,"value":1158},{"type":993,"tag":1027,"props":6775,"children":6776},{"style":1054},[6777],{"type":999,"value":6193},{"type":993,"tag":1027,"props":6779,"children":6780},{"style":1042},[6781],{"type":999,"value":2457},{"type":993,"tag":1027,"props":6783,"children":6784},{"style":1054},[6785],{"type":999,"value":6508},{"type":993,"tag":1027,"props":6787,"children":6788},{"style":1273},[6789],{"type":999,"value":6543},{"type":993,"tag":1027,"props":6791,"children":6792},{"style":1054},[6793],{"type":999,"value":6723},{"type":993,"tag":1027,"props":6795,"children":6796},{"class":1029,"line":293},[6797],{"type":993,"tag":1027,"props":6798,"children":6799},{"style":1054},[6800],{"type":999,"value":1107},{"type":993,"tag":1027,"props":6802,"children":6803},{"class":1029,"line":302},[6804,6808,6813],{"type":993,"tag":1027,"props":6805,"children":6806},{"style":1042},[6807],{"type":999,"value":1065},{"type":993,"tag":1027,"props":6809,"children":6810},{"style":1048},[6811],{"type":999,"value":6812}," get_task_count",{"type":993,"tag":1027,"props":6814,"children":6815},{"style":1054},[6816],{"type":999,"value":1076},{"type":993,"tag":1027,"props":6818,"children":6819},{"class":1029,"line":311},[6820,6824,6829,6833,6837],{"type":993,"tag":1027,"props":6821,"children":6822},{"style":1042},[6823],{"type":999,"value":1153},{"type":993,"tag":1027,"props":6825,"children":6826},{"style":1068},[6827],{"type":999,"value":6828}," len",{"type":993,"tag":1027,"props":6830,"children":6831},{"style":1054},[6832],{"type":999,"value":4027},{"type":993,"tag":1027,"props":6834,"children":6835},{"style":1068},[6836],{"type":999,"value":1391},{"type":993,"tag":1027,"props":6838,"children":6839},{"style":1054},[6840],{"type":999,"value":6841},".tasks)\n",{"type":993,"tag":1027,"props":6843,"children":6844},{"class":1029,"line":320},[6845],{"type":993,"tag":1027,"props":6846,"children":6847},{"style":1054},[6848],{"type":999,"value":1107},{"type":993,"tag":1027,"props":6850,"children":6851},{"class":1029,"line":329},[6852],{"type":993,"tag":1027,"props":6853,"children":6854},{"style":1033},[6855],{"type":999,"value":6856},"    # Display methods\n",{"type":993,"tag":1027,"props":6858,"children":6859},{"class":1029,"line":338},[6860,6864,6869],{"type":993,"tag":1027,"props":6861,"children":6862},{"style":1042},[6863],{"type":999,"value":1065},{"type":993,"tag":1027,"props":6865,"children":6866},{"style":1048},[6867],{"type":999,"value":6868}," show_summary",{"type":993,"tag":1027,"props":6870,"children":6871},{"style":1054},[6872],{"type":999,"value":1076},{"type":993,"tag":1027,"props":6874,"children":6875},{"class":1029,"line":347},[6876,6881,6885,6889,6893,6897],{"type":993,"tag":1027,"props":6877,"children":6878},{"style":1054},[6879],{"type":999,"value":6880},"        pending ",{"type":993,"tag":1027,"props":6882,"children":6883},{"style":1042},[6884],{"type":999,"value":1094},{"type":993,"tag":1027,"props":6886,"children":6887},{"style":1068},[6888],{"type":999,"value":6828},{"type":993,"tag":1027,"props":6890,"children":6891},{"style":1054},[6892],{"type":999,"value":4027},{"type":993,"tag":1027,"props":6894,"children":6895},{"style":1068},[6896],{"type":999,"value":1391},{"type":993,"tag":1027,"props":6898,"children":6899},{"style":1054},[6900],{"type":999,"value":6901},".get_pending_tasks())\n",{"type":993,"tag":1027,"props":6903,"children":6904},{"class":1029,"line":356},[6905,6909,6913,6918,6922,6927,6931,6936,6940,6945,6949],{"type":993,"tag":1027,"props":6906,"children":6907},{"style":1042},[6908],{"type":999,"value":1153},{"type":993,"tag":1027,"props":6910,"children":6911},{"style":1042},[6912],{"type":999,"value":1690},{"type":993,"tag":1027,"props":6914,"children":6915},{"style":1273},[6916],{"type":999,"value":6917},"\"Tasks: ",{"type":993,"tag":1027,"props":6919,"children":6920},{"style":1068},[6921],{"type":999,"value":1832},{"type":993,"tag":1027,"props":6923,"children":6924},{"style":1054},[6925],{"type":999,"value":6926},"pending",{"type":993,"tag":1027,"props":6928,"children":6929},{"style":1068},[6930],{"type":999,"value":1710},{"type":993,"tag":1027,"props":6932,"children":6933},{"style":1273},[6934],{"type":999,"value":6935}," pending, ",{"type":993,"tag":1027,"props":6937,"children":6938},{"style":1068},[6939],{"type":999,"value":1700},{"type":993,"tag":1027,"props":6941,"children":6942},{"style":1054},[6943],{"type":999,"value":6944},".completed_count",{"type":993,"tag":1027,"props":6946,"children":6947},{"style":1068},[6948],{"type":999,"value":1710},{"type":993,"tag":1027,"props":6950,"children":6951},{"style":1273},[6952],{"type":999,"value":6953}," completed\"\n",{"type":993,"tag":1027,"props":6955,"children":6956},{"class":1029,"line":365},[6957],{"type":993,"tag":1027,"props":6958,"children":6959},{"emptyLinePlaceholder":13},[6960],{"type":999,"value":1284},{"type":993,"tag":1027,"props":6962,"children":6963},{"class":1029,"line":374},[6964],{"type":993,"tag":1027,"props":6965,"children":6966},{"style":1033},[6967],{"type":999,"value":6968},"# Well-organized method usage\n",{"type":993,"tag":1027,"props":6970,"children":6971},{"class":1029,"line":384},[6972,6977,6981],{"type":993,"tag":1027,"props":6973,"children":6974},{"style":1054},[6975],{"type":999,"value":6976},"manager ",{"type":993,"tag":1027,"props":6978,"children":6979},{"style":1042},[6980],{"type":999,"value":1094},{"type":993,"tag":1027,"props":6982,"children":6983},{"style":1054},[6984],{"type":999,"value":6985}," TaskManager()\n",{"type":993,"tag":1027,"props":6987,"children":6988},{"class":1029,"line":393},[6989,6994,6999,7003,7008],{"type":993,"tag":1027,"props":6990,"children":6991},{"style":1054},[6992],{"type":999,"value":6993},"manager.add_task(",{"type":993,"tag":1027,"props":6995,"children":6996},{"style":1273},[6997],{"type":999,"value":6998},"\"Learn Python\"",{"type":993,"tag":1027,"props":7000,"children":7001},{"style":1054},[7002],{"type":999,"value":1488},{"type":993,"tag":1027,"props":7004,"children":7005},{"style":1273},[7006],{"type":999,"value":7007},"\"high\"",{"type":993,"tag":1027,"props":7009,"children":7010},{"style":1054},[7011],{"type":999,"value":2077},{"type":993,"tag":1027,"props":7013,"children":7014},{"class":1029,"line":402},[7015,7019,7024,7028,7033],{"type":993,"tag":1027,"props":7016,"children":7017},{"style":1054},[7018],{"type":999,"value":6993},{"type":993,"tag":1027,"props":7020,"children":7021},{"style":1273},[7022],{"type":999,"value":7023},"\"Buy groceries\"",{"type":993,"tag":1027,"props":7025,"children":7026},{"style":1054},[7027],{"type":999,"value":1488},{"type":993,"tag":1027,"props":7029,"children":7030},{"style":1273},[7031],{"type":999,"value":7032},"\"low\"",{"type":993,"tag":1027,"props":7034,"children":7035},{"style":1054},[7036],{"type":999,"value":2077},{"type":993,"tag":1027,"props":7038,"children":7039},{"class":1029,"line":411},[7040,7045,7049],{"type":993,"tag":1027,"props":7041,"children":7042},{"style":1054},[7043],{"type":999,"value":7044},"manager.complete_task(",{"type":993,"tag":1027,"props":7046,"children":7047},{"style":1068},[7048],{"type":999,"value":3472},{"type":993,"tag":1027,"props":7050,"children":7051},{"style":1054},[7052],{"type":999,"value":2077},{"type":993,"tag":1027,"props":7054,"children":7055},{"class":1029,"line":420},[7056],{"type":993,"tag":1027,"props":7057,"children":7058},{"emptyLinePlaceholder":13},[7059],{"type":999,"value":1284},{"type":993,"tag":1027,"props":7061,"children":7062},{"class":1029,"line":429},[7063,7067],{"type":993,"tag":1027,"props":7064,"children":7065},{"style":1068},[7066],{"type":999,"value":1309},{"type":993,"tag":1027,"props":7068,"children":7069},{"style":1054},[7070],{"type":999,"value":7071},"(manager.show_summary())\n",{"type":993,"tag":1027,"props":7073,"children":7074},{"class":1029,"line":438},[7075,7079,7083,7087,7092,7096,7101,7105,7109],{"type":993,"tag":1027,"props":7076,"children":7077},{"style":1068},[7078],{"type":999,"value":1309},{"type":993,"tag":1027,"props":7080,"children":7081},{"style":1054},[7082],{"type":999,"value":4027},{"type":993,"tag":1027,"props":7084,"children":7085},{"style":1042},[7086],{"type":999,"value":4150},{"type":993,"tag":1027,"props":7088,"children":7089},{"style":1273},[7090],{"type":999,"value":7091},"\"Pending tasks: ",{"type":993,"tag":1027,"props":7093,"children":7094},{"style":1068},[7095],{"type":999,"value":4959},{"type":993,"tag":1027,"props":7097,"children":7098},{"style":1054},[7099],{"type":999,"value":7100},"(manager.get_pending_tasks())",{"type":993,"tag":1027,"props":7102,"children":7103},{"style":1068},[7104],{"type":999,"value":1710},{"type":993,"tag":1027,"props":7106,"children":7107},{"style":1273},[7108],{"type":999,"value":1695},{"type":993,"tag":1027,"props":7110,"children":7111},{"style":1054},[7112],{"type":999,"value":2077},{"type":993,"tag":1375,"props":7114,"children":7116},{"id":7115},"practical-applications",[7117],{"type":999,"value":7118},"💡 Practical Applications",{"type":993,"tag":1534,"props":7120,"children":7122},{"id":7121},"building-interactive-objects",[7123],{"type":999,"value":7124},"Building Interactive Objects",{"type":993,"tag":1002,"props":7126,"children":7127},{},[7128],{"type":999,"value":7129},"Methods enable objects to respond to user actions and maintain their state appropriately.",{"type":993,"tag":1013,"props":7131,"children":7132},{},[7133],{"type":993,"tag":1017,"props":7134,"children":7136},{"className":1019,"code":7135,"language":6,"meta":8,"style":8},"class GameCharacter:\n    def __init__(self, name, health=100):\n        self.name = name\n        self.health = health\n        self.max_health = health\n        self.level = 1\n        self.experience = 0\n    \n    def take_damage(self, damage):\n        self.health = max(0, self.health - damage)\n        if self.health == 0:\n            return f\"{self.name} has been defeated!\"\n        return f\"{self.name} took {damage} damage. Health: {self.health}/{self.max_health}\"\n    \n    def heal(self, amount):\n        self.health = min(self.max_health, self.health + amount)\n        return f\"{self.name} healed {amount} HP. Health: {self.health}/{self.max_health}\"\n    \n    def gain_experience(self, xp):\n        self.experience += xp\n        if self.experience >= self.level * 100:\n            return self.level_up()\n        return f\"{self.name} gained {xp} XP\"\n    \n    def level_up(self):\n        self.level += 1\n        self.max_health += 20\n        self.health = self.max_health\n        self.experience = 0\n        return f\"{self.name} leveled up! Now level {self.level}\"\n    \n    def get_status(self):\n        return f\"{self.name} - Level {self.level} - HP: {self.health}/{self.max_health} - XP: {self.experience}\"\n\n# Interactive character\nhero = GameCharacter(\"Hero\")\nprint(hero.take_damage(30))\nprint(hero.heal(15))\nprint(hero.gain_experience(150))\nprint(hero.get_status())\n",[7137],{"type":993,"tag":1023,"props":7138,"children":7139},{"__ignoreMap":8},[7140,7156,7184,7203,7224,7244,7264,7284,7291,7308,7357,7384,7416,7501,7508,7525,7575,7656,7663,7680,7700,7741,7757,7807,7814,7830,7849,7869,7893,7912,7961,7968,7984,8083,8090,8098,8124,8144,8165,8186],{"type":993,"tag":1027,"props":7141,"children":7142},{"class":1029,"line":12},[7143,7147,7152],{"type":993,"tag":1027,"props":7144,"children":7145},{"style":1042},[7146],{"type":999,"value":1045},{"type":993,"tag":1027,"props":7148,"children":7149},{"style":1048},[7150],{"type":999,"value":7151}," GameCharacter",{"type":993,"tag":1027,"props":7153,"children":7154},{"style":1054},[7155],{"type":999,"value":1057},{"type":993,"tag":1027,"props":7157,"children":7158},{"class":1029,"line":27},[7159,7163,7167,7172,7176,7180],{"type":993,"tag":1027,"props":7160,"children":7161},{"style":1042},[7162],{"type":999,"value":1065},{"type":993,"tag":1027,"props":7164,"children":7165},{"style":1068},[7166],{"type":999,"value":1071},{"type":993,"tag":1027,"props":7168,"children":7169},{"style":1054},[7170],{"type":999,"value":7171},"(self, name, health",{"type":993,"tag":1027,"props":7173,"children":7174},{"style":1042},[7175],{"type":999,"value":1094},{"type":993,"tag":1027,"props":7177,"children":7178},{"style":1068},[7179],{"type":999,"value":2072},{"type":993,"tag":1027,"props":7181,"children":7182},{"style":1054},[7183],{"type":999,"value":1607},{"type":993,"tag":1027,"props":7185,"children":7186},{"class":1029,"line":36},[7187,7191,7195,7199],{"type":993,"tag":1027,"props":7188,"children":7189},{"style":1068},[7190],{"type":999,"value":1084},{"type":993,"tag":1027,"props":7192,"children":7193},{"style":1054},[7194],{"type":999,"value":2245},{"type":993,"tag":1027,"props":7196,"children":7197},{"style":1042},[7198],{"type":999,"value":1094},{"type":993,"tag":1027,"props":7200,"children":7201},{"style":1054},[7202],{"type":999,"value":2254},{"type":993,"tag":1027,"props":7204,"children":7205},{"class":1029,"line":45},[7206,7210,7215,7219],{"type":993,"tag":1027,"props":7207,"children":7208},{"style":1068},[7209],{"type":999,"value":1084},{"type":993,"tag":1027,"props":7211,"children":7212},{"style":1054},[7213],{"type":999,"value":7214},".health ",{"type":993,"tag":1027,"props":7216,"children":7217},{"style":1042},[7218],{"type":999,"value":1094},{"type":993,"tag":1027,"props":7220,"children":7221},{"style":1054},[7222],{"type":999,"value":7223}," health\n",{"type":993,"tag":1027,"props":7225,"children":7226},{"class":1029,"line":54},[7227,7231,7236,7240],{"type":993,"tag":1027,"props":7228,"children":7229},{"style":1068},[7230],{"type":999,"value":1084},{"type":993,"tag":1027,"props":7232,"children":7233},{"style":1054},[7234],{"type":999,"value":7235},".max_health ",{"type":993,"tag":1027,"props":7237,"children":7238},{"style":1042},[7239],{"type":999,"value":1094},{"type":993,"tag":1027,"props":7241,"children":7242},{"style":1054},[7243],{"type":999,"value":7223},{"type":993,"tag":1027,"props":7245,"children":7246},{"class":1029,"line":63},[7247,7251,7256,7260],{"type":993,"tag":1027,"props":7248,"children":7249},{"style":1068},[7250],{"type":999,"value":1084},{"type":993,"tag":1027,"props":7252,"children":7253},{"style":1054},[7254],{"type":999,"value":7255},".level ",{"type":993,"tag":1027,"props":7257,"children":7258},{"style":1042},[7259],{"type":999,"value":1094},{"type":993,"tag":1027,"props":7261,"children":7262},{"style":1068},[7263],{"type":999,"value":6593},{"type":993,"tag":1027,"props":7265,"children":7266},{"class":1029,"line":72},[7267,7271,7276,7280],{"type":993,"tag":1027,"props":7268,"children":7269},{"style":1068},[7270],{"type":999,"value":1084},{"type":993,"tag":1027,"props":7272,"children":7273},{"style":1054},[7274],{"type":999,"value":7275},".experience ",{"type":993,"tag":1027,"props":7277,"children":7278},{"style":1042},[7279],{"type":999,"value":1094},{"type":993,"tag":1027,"props":7281,"children":7282},{"style":1068},[7283],{"type":999,"value":1099},{"type":993,"tag":1027,"props":7285,"children":7286},{"class":1029,"line":81},[7287],{"type":993,"tag":1027,"props":7288,"children":7289},{"style":1054},[7290],{"type":999,"value":1107},{"type":993,"tag":1027,"props":7292,"children":7293},{"class":1029,"line":91},[7294,7298,7303],{"type":993,"tag":1027,"props":7295,"children":7296},{"style":1042},[7297],{"type":999,"value":1065},{"type":993,"tag":1027,"props":7299,"children":7300},{"style":1048},[7301],{"type":999,"value":7302}," take_damage",{"type":993,"tag":1027,"props":7304,"children":7305},{"style":1054},[7306],{"type":999,"value":7307},"(self, damage):\n",{"type":993,"tag":1027,"props":7309,"children":7310},{"class":1029,"line":100},[7311,7315,7319,7323,7328,7332,7336,7340,7344,7348,7352],{"type":993,"tag":1027,"props":7312,"children":7313},{"style":1068},[7314],{"type":999,"value":1084},{"type":993,"tag":1027,"props":7316,"children":7317},{"style":1054},[7318],{"type":999,"value":7214},{"type":993,"tag":1027,"props":7320,"children":7321},{"style":1042},[7322],{"type":999,"value":1094},{"type":993,"tag":1027,"props":7324,"children":7325},{"style":1068},[7326],{"type":999,"value":7327}," max",{"type":993,"tag":1027,"props":7329,"children":7330},{"style":1054},[7331],{"type":999,"value":4027},{"type":993,"tag":1027,"props":7333,"children":7334},{"style":1068},[7335],{"type":999,"value":1602},{"type":993,"tag":1027,"props":7337,"children":7338},{"style":1054},[7339],{"type":999,"value":1488},{"type":993,"tag":1027,"props":7341,"children":7342},{"style":1068},[7343],{"type":999,"value":1391},{"type":993,"tag":1027,"props":7345,"children":7346},{"style":1054},[7347],{"type":999,"value":7214},{"type":993,"tag":1027,"props":7349,"children":7350},{"style":1042},[7351],{"type":999,"value":4406},{"type":993,"tag":1027,"props":7353,"children":7354},{"style":1054},[7355],{"type":999,"value":7356}," damage)\n",{"type":993,"tag":1027,"props":7358,"children":7359},{"class":1029,"line":109},[7360,7364,7368,7372,7376,7380],{"type":993,"tag":1027,"props":7361,"children":7362},{"style":1042},[7363],{"type":999,"value":1770},{"type":993,"tag":1027,"props":7365,"children":7366},{"style":1068},[7367],{"type":999,"value":1158},{"type":993,"tag":1027,"props":7369,"children":7370},{"style":1054},[7371],{"type":999,"value":7214},{"type":993,"tag":1027,"props":7373,"children":7374},{"style":1042},[7375],{"type":999,"value":4322},{"type":993,"tag":1027,"props":7377,"children":7378},{"style":1068},[7379],{"type":999,"value":1785},{"type":993,"tag":1027,"props":7381,"children":7382},{"style":1054},[7383],{"type":999,"value":1057},{"type":993,"tag":1027,"props":7385,"children":7386},{"class":1029,"line":118},[7387,7391,7395,7399,7403,7407,7411],{"type":993,"tag":1027,"props":7388,"children":7389},{"style":1042},[7390],{"type":999,"value":1818},{"type":993,"tag":1027,"props":7392,"children":7393},{"style":1042},[7394],{"type":999,"value":1690},{"type":993,"tag":1027,"props":7396,"children":7397},{"style":1273},[7398],{"type":999,"value":1695},{"type":993,"tag":1027,"props":7400,"children":7401},{"style":1068},[7402],{"type":999,"value":1700},{"type":993,"tag":1027,"props":7404,"children":7405},{"style":1054},[7406],{"type":999,"value":2364},{"type":993,"tag":1027,"props":7408,"children":7409},{"style":1068},[7410],{"type":999,"value":1710},{"type":993,"tag":1027,"props":7412,"children":7413},{"style":1273},[7414],{"type":999,"value":7415}," has been defeated!\"\n",{"type":993,"tag":1027,"props":7417,"children":7418},{"class":1029,"line":127},[7419,7423,7427,7431,7435,7439,7443,7448,7452,7457,7461,7466,7470,7475,7479,7484,7488,7493,7497],{"type":993,"tag":1027,"props":7420,"children":7421},{"style":1042},[7422],{"type":999,"value":1153},{"type":993,"tag":1027,"props":7424,"children":7425},{"style":1042},[7426],{"type":999,"value":1690},{"type":993,"tag":1027,"props":7428,"children":7429},{"style":1273},[7430],{"type":999,"value":1695},{"type":993,"tag":1027,"props":7432,"children":7433},{"style":1068},[7434],{"type":999,"value":1700},{"type":993,"tag":1027,"props":7436,"children":7437},{"style":1054},[7438],{"type":999,"value":2364},{"type":993,"tag":1027,"props":7440,"children":7441},{"style":1068},[7442],{"type":999,"value":1710},{"type":993,"tag":1027,"props":7444,"children":7445},{"style":1273},[7446],{"type":999,"value":7447}," took ",{"type":993,"tag":1027,"props":7449,"children":7450},{"style":1068},[7451],{"type":999,"value":1832},{"type":993,"tag":1027,"props":7453,"children":7454},{"style":1054},[7455],{"type":999,"value":7456},"damage",{"type":993,"tag":1027,"props":7458,"children":7459},{"style":1068},[7460],{"type":999,"value":1710},{"type":993,"tag":1027,"props":7462,"children":7463},{"style":1273},[7464],{"type":999,"value":7465}," damage. Health: ",{"type":993,"tag":1027,"props":7467,"children":7468},{"style":1068},[7469],{"type":999,"value":1700},{"type":993,"tag":1027,"props":7471,"children":7472},{"style":1054},[7473],{"type":999,"value":7474},".health",{"type":993,"tag":1027,"props":7476,"children":7477},{"style":1068},[7478],{"type":999,"value":1710},{"type":993,"tag":1027,"props":7480,"children":7481},{"style":1273},[7482],{"type":999,"value":7483},"/",{"type":993,"tag":1027,"props":7485,"children":7486},{"style":1068},[7487],{"type":999,"value":1700},{"type":993,"tag":1027,"props":7489,"children":7490},{"style":1054},[7491],{"type":999,"value":7492},".max_health",{"type":993,"tag":1027,"props":7494,"children":7495},{"style":1068},[7496],{"type":999,"value":1710},{"type":993,"tag":1027,"props":7498,"children":7499},{"style":1273},[7500],{"type":999,"value":1733},{"type":993,"tag":1027,"props":7502,"children":7503},{"class":1029,"line":136},[7504],{"type":993,"tag":1027,"props":7505,"children":7506},{"style":1054},[7507],{"type":999,"value":1107},{"type":993,"tag":1027,"props":7509,"children":7510},{"class":1029,"line":146},[7511,7515,7520],{"type":993,"tag":1027,"props":7512,"children":7513},{"style":1042},[7514],{"type":999,"value":1065},{"type":993,"tag":1027,"props":7516,"children":7517},{"style":1048},[7518],{"type":999,"value":7519}," heal",{"type":993,"tag":1027,"props":7521,"children":7522},{"style":1054},[7523],{"type":999,"value":7524},"(self, amount):\n",{"type":993,"tag":1027,"props":7526,"children":7527},{"class":1029,"line":155},[7528,7532,7536,7540,7545,7549,7553,7558,7562,7566,7570],{"type":993,"tag":1027,"props":7529,"children":7530},{"style":1068},[7531],{"type":999,"value":1084},{"type":993,"tag":1027,"props":7533,"children":7534},{"style":1054},[7535],{"type":999,"value":7214},{"type":993,"tag":1027,"props":7537,"children":7538},{"style":1042},[7539],{"type":999,"value":1094},{"type":993,"tag":1027,"props":7541,"children":7542},{"style":1068},[7543],{"type":999,"value":7544}," min",{"type":993,"tag":1027,"props":7546,"children":7547},{"style":1054},[7548],{"type":999,"value":4027},{"type":993,"tag":1027,"props":7550,"children":7551},{"style":1068},[7552],{"type":999,"value":1391},{"type":993,"tag":1027,"props":7554,"children":7555},{"style":1054},[7556],{"type":999,"value":7557},".max_health, ",{"type":993,"tag":1027,"props":7559,"children":7560},{"style":1068},[7561],{"type":999,"value":1391},{"type":993,"tag":1027,"props":7563,"children":7564},{"style":1054},[7565],{"type":999,"value":7214},{"type":993,"tag":1027,"props":7567,"children":7568},{"style":1042},[7569],{"type":999,"value":4388},{"type":993,"tag":1027,"props":7571,"children":7572},{"style":1054},[7573],{"type":999,"value":7574}," amount)\n",{"type":993,"tag":1027,"props":7576,"children":7577},{"class":1029,"line":164},[7578,7582,7586,7590,7594,7598,7602,7607,7611,7615,7619,7624,7628,7632,7636,7640,7644,7648,7652],{"type":993,"tag":1027,"props":7579,"children":7580},{"style":1042},[7581],{"type":999,"value":1153},{"type":993,"tag":1027,"props":7583,"children":7584},{"style":1042},[7585],{"type":999,"value":1690},{"type":993,"tag":1027,"props":7587,"children":7588},{"style":1273},[7589],{"type":999,"value":1695},{"type":993,"tag":1027,"props":7591,"children":7592},{"style":1068},[7593],{"type":999,"value":1700},{"type":993,"tag":1027,"props":7595,"children":7596},{"style":1054},[7597],{"type":999,"value":2364},{"type":993,"tag":1027,"props":7599,"children":7600},{"style":1068},[7601],{"type":999,"value":1710},{"type":993,"tag":1027,"props":7603,"children":7604},{"style":1273},[7605],{"type":999,"value":7606}," healed ",{"type":993,"tag":1027,"props":7608,"children":7609},{"style":1068},[7610],{"type":999,"value":1832},{"type":993,"tag":1027,"props":7612,"children":7613},{"style":1054},[7614],{"type":999,"value":1837},{"type":993,"tag":1027,"props":7616,"children":7617},{"style":1068},[7618],{"type":999,"value":1710},{"type":993,"tag":1027,"props":7620,"children":7621},{"style":1273},[7622],{"type":999,"value":7623}," HP. Health: ",{"type":993,"tag":1027,"props":7625,"children":7626},{"style":1068},[7627],{"type":999,"value":1700},{"type":993,"tag":1027,"props":7629,"children":7630},{"style":1054},[7631],{"type":999,"value":7474},{"type":993,"tag":1027,"props":7633,"children":7634},{"style":1068},[7635],{"type":999,"value":1710},{"type":993,"tag":1027,"props":7637,"children":7638},{"style":1273},[7639],{"type":999,"value":7483},{"type":993,"tag":1027,"props":7641,"children":7642},{"style":1068},[7643],{"type":999,"value":1700},{"type":993,"tag":1027,"props":7645,"children":7646},{"style":1054},[7647],{"type":999,"value":7492},{"type":993,"tag":1027,"props":7649,"children":7650},{"style":1068},[7651],{"type":999,"value":1710},{"type":993,"tag":1027,"props":7653,"children":7654},{"style":1273},[7655],{"type":999,"value":1733},{"type":993,"tag":1027,"props":7657,"children":7658},{"class":1029,"line":173},[7659],{"type":993,"tag":1027,"props":7660,"children":7661},{"style":1054},[7662],{"type":999,"value":1107},{"type":993,"tag":1027,"props":7664,"children":7665},{"class":1029,"line":182},[7666,7670,7675],{"type":993,"tag":1027,"props":7667,"children":7668},{"style":1042},[7669],{"type":999,"value":1065},{"type":993,"tag":1027,"props":7671,"children":7672},{"style":1048},[7673],{"type":999,"value":7674}," gain_experience",{"type":993,"tag":1027,"props":7676,"children":7677},{"style":1054},[7678],{"type":999,"value":7679},"(self, xp):\n",{"type":993,"tag":1027,"props":7681,"children":7682},{"class":1029,"line":191},[7683,7687,7691,7695],{"type":993,"tag":1027,"props":7684,"children":7685},{"style":1068},[7686],{"type":999,"value":1084},{"type":993,"tag":1027,"props":7688,"children":7689},{"style":1054},[7690],{"type":999,"value":7275},{"type":993,"tag":1027,"props":7692,"children":7693},{"style":1042},[7694],{"type":999,"value":1140},{"type":993,"tag":1027,"props":7696,"children":7697},{"style":1054},[7698],{"type":999,"value":7699}," xp\n",{"type":993,"tag":1027,"props":7701,"children":7702},{"class":1029,"line":201},[7703,7707,7711,7715,7720,7724,7728,7732,7737],{"type":993,"tag":1027,"props":7704,"children":7705},{"style":1042},[7706],{"type":999,"value":1770},{"type":993,"tag":1027,"props":7708,"children":7709},{"style":1068},[7710],{"type":999,"value":1158},{"type":993,"tag":1027,"props":7712,"children":7713},{"style":1054},[7714],{"type":999,"value":7275},{"type":993,"tag":1027,"props":7716,"children":7717},{"style":1042},[7718],{"type":999,"value":7719},">=",{"type":993,"tag":1027,"props":7721,"children":7722},{"style":1068},[7723],{"type":999,"value":1158},{"type":993,"tag":1027,"props":7725,"children":7726},{"style":1054},[7727],{"type":999,"value":7255},{"type":993,"tag":1027,"props":7729,"children":7730},{"style":1042},[7731],{"type":999,"value":2857},{"type":993,"tag":1027,"props":7733,"children":7734},{"style":1068},[7735],{"type":999,"value":7736}," 100",{"type":993,"tag":1027,"props":7738,"children":7739},{"style":1054},[7740],{"type":999,"value":1057},{"type":993,"tag":1027,"props":7742,"children":7743},{"class":1029,"line":210},[7744,7748,7752],{"type":993,"tag":1027,"props":7745,"children":7746},{"style":1042},[7747],{"type":999,"value":1818},{"type":993,"tag":1027,"props":7749,"children":7750},{"style":1068},[7751],{"type":999,"value":1158},{"type":993,"tag":1027,"props":7753,"children":7754},{"style":1054},[7755],{"type":999,"value":7756},".level_up()\n",{"type":993,"tag":1027,"props":7758,"children":7759},{"class":1029,"line":219},[7760,7764,7768,7772,7776,7780,7784,7789,7793,7798,7802],{"type":993,"tag":1027,"props":7761,"children":7762},{"style":1042},[7763],{"type":999,"value":1153},{"type":993,"tag":1027,"props":7765,"children":7766},{"style":1042},[7767],{"type":999,"value":1690},{"type":993,"tag":1027,"props":7769,"children":7770},{"style":1273},[7771],{"type":999,"value":1695},{"type":993,"tag":1027,"props":7773,"children":7774},{"style":1068},[7775],{"type":999,"value":1700},{"type":993,"tag":1027,"props":7777,"children":7778},{"style":1054},[7779],{"type":999,"value":2364},{"type":993,"tag":1027,"props":7781,"children":7782},{"style":1068},[7783],{"type":999,"value":1710},{"type":993,"tag":1027,"props":7785,"children":7786},{"style":1273},[7787],{"type":999,"value":7788}," gained ",{"type":993,"tag":1027,"props":7790,"children":7791},{"style":1068},[7792],{"type":999,"value":1832},{"type":993,"tag":1027,"props":7794,"children":7795},{"style":1054},[7796],{"type":999,"value":7797},"xp",{"type":993,"tag":1027,"props":7799,"children":7800},{"style":1068},[7801],{"type":999,"value":1710},{"type":993,"tag":1027,"props":7803,"children":7804},{"style":1273},[7805],{"type":999,"value":7806}," XP\"\n",{"type":993,"tag":1027,"props":7808,"children":7809},{"class":1029,"line":228},[7810],{"type":993,"tag":1027,"props":7811,"children":7812},{"style":1054},[7813],{"type":999,"value":1107},{"type":993,"tag":1027,"props":7815,"children":7816},{"class":1029,"line":238},[7817,7821,7826],{"type":993,"tag":1027,"props":7818,"children":7819},{"style":1042},[7820],{"type":999,"value":1065},{"type":993,"tag":1027,"props":7822,"children":7823},{"style":1048},[7824],{"type":999,"value":7825}," level_up",{"type":993,"tag":1027,"props":7827,"children":7828},{"style":1054},[7829],{"type":999,"value":1076},{"type":993,"tag":1027,"props":7831,"children":7832},{"class":1029,"line":247},[7833,7837,7841,7845],{"type":993,"tag":1027,"props":7834,"children":7835},{"style":1068},[7836],{"type":999,"value":1084},{"type":993,"tag":1027,"props":7838,"children":7839},{"style":1054},[7840],{"type":999,"value":7255},{"type":993,"tag":1027,"props":7842,"children":7843},{"style":1042},[7844],{"type":999,"value":1140},{"type":993,"tag":1027,"props":7846,"children":7847},{"style":1068},[7848],{"type":999,"value":6593},{"type":993,"tag":1027,"props":7850,"children":7851},{"class":1029,"line":256},[7852,7856,7860,7864],{"type":993,"tag":1027,"props":7853,"children":7854},{"style":1068},[7855],{"type":999,"value":1084},{"type":993,"tag":1027,"props":7857,"children":7858},{"style":1054},[7859],{"type":999,"value":7235},{"type":993,"tag":1027,"props":7861,"children":7862},{"style":1042},[7863],{"type":999,"value":1140},{"type":993,"tag":1027,"props":7865,"children":7866},{"style":1068},[7867],{"type":999,"value":7868}," 20\n",{"type":993,"tag":1027,"props":7870,"children":7871},{"class":1029,"line":265},[7872,7876,7880,7884,7888],{"type":993,"tag":1027,"props":7873,"children":7874},{"style":1068},[7875],{"type":999,"value":1084},{"type":993,"tag":1027,"props":7877,"children":7878},{"style":1054},[7879],{"type":999,"value":7214},{"type":993,"tag":1027,"props":7881,"children":7882},{"style":1042},[7883],{"type":999,"value":1094},{"type":993,"tag":1027,"props":7885,"children":7886},{"style":1068},[7887],{"type":999,"value":1158},{"type":993,"tag":1027,"props":7889,"children":7890},{"style":1054},[7891],{"type":999,"value":7892},".max_health\n",{"type":993,"tag":1027,"props":7894,"children":7895},{"class":1029,"line":274},[7896,7900,7904,7908],{"type":993,"tag":1027,"props":7897,"children":7898},{"style":1068},[7899],{"type":999,"value":1084},{"type":993,"tag":1027,"props":7901,"children":7902},{"style":1054},[7903],{"type":999,"value":7275},{"type":993,"tag":1027,"props":7905,"children":7906},{"style":1042},[7907],{"type":999,"value":1094},{"type":993,"tag":1027,"props":7909,"children":7910},{"style":1068},[7911],{"type":999,"value":1099},{"type":993,"tag":1027,"props":7913,"children":7914},{"class":1029,"line":284},[7915,7919,7923,7927,7931,7935,7939,7944,7948,7953,7957],{"type":993,"tag":1027,"props":7916,"children":7917},{"style":1042},[7918],{"type":999,"value":1153},{"type":993,"tag":1027,"props":7920,"children":7921},{"style":1042},[7922],{"type":999,"value":1690},{"type":993,"tag":1027,"props":7924,"children":7925},{"style":1273},[7926],{"type":999,"value":1695},{"type":993,"tag":1027,"props":7928,"children":7929},{"style":1068},[7930],{"type":999,"value":1700},{"type":993,"tag":1027,"props":7932,"children":7933},{"style":1054},[7934],{"type":999,"value":2364},{"type":993,"tag":1027,"props":7936,"children":7937},{"style":1068},[7938],{"type":999,"value":1710},{"type":993,"tag":1027,"props":7940,"children":7941},{"style":1273},[7942],{"type":999,"value":7943}," leveled up! Now level ",{"type":993,"tag":1027,"props":7945,"children":7946},{"style":1068},[7947],{"type":999,"value":1700},{"type":993,"tag":1027,"props":7949,"children":7950},{"style":1054},[7951],{"type":999,"value":7952},".level",{"type":993,"tag":1027,"props":7954,"children":7955},{"style":1068},[7956],{"type":999,"value":1710},{"type":993,"tag":1027,"props":7958,"children":7959},{"style":1273},[7960],{"type":999,"value":1733},{"type":993,"tag":1027,"props":7962,"children":7963},{"class":1029,"line":293},[7964],{"type":993,"tag":1027,"props":7965,"children":7966},{"style":1054},[7967],{"type":999,"value":1107},{"type":993,"tag":1027,"props":7969,"children":7970},{"class":1029,"line":302},[7971,7975,7980],{"type":993,"tag":1027,"props":7972,"children":7973},{"style":1042},[7974],{"type":999,"value":1065},{"type":993,"tag":1027,"props":7976,"children":7977},{"style":1048},[7978],{"type":999,"value":7979}," get_status",{"type":993,"tag":1027,"props":7981,"children":7982},{"style":1054},[7983],{"type":999,"value":1076},{"type":993,"tag":1027,"props":7985,"children":7986},{"class":1029,"line":311},[7987,7991,7995,7999,8003,8007,8011,8016,8020,8024,8028,8033,8037,8041,8045,8049,8053,8057,8061,8066,8070,8075,8079],{"type":993,"tag":1027,"props":7988,"children":7989},{"style":1042},[7990],{"type":999,"value":1153},{"type":993,"tag":1027,"props":7992,"children":7993},{"style":1042},[7994],{"type":999,"value":1690},{"type":993,"tag":1027,"props":7996,"children":7997},{"style":1273},[7998],{"type":999,"value":1695},{"type":993,"tag":1027,"props":8000,"children":8001},{"style":1068},[8002],{"type":999,"value":1700},{"type":993,"tag":1027,"props":8004,"children":8005},{"style":1054},[8006],{"type":999,"value":2364},{"type":993,"tag":1027,"props":8008,"children":8009},{"style":1068},[8010],{"type":999,"value":1710},{"type":993,"tag":1027,"props":8012,"children":8013},{"style":1273},[8014],{"type":999,"value":8015}," - Level ",{"type":993,"tag":1027,"props":8017,"children":8018},{"style":1068},[8019],{"type":999,"value":1700},{"type":993,"tag":1027,"props":8021,"children":8022},{"style":1054},[8023],{"type":999,"value":7952},{"type":993,"tag":1027,"props":8025,"children":8026},{"style":1068},[8027],{"type":999,"value":1710},{"type":993,"tag":1027,"props":8029,"children":8030},{"style":1273},[8031],{"type":999,"value":8032}," - HP: ",{"type":993,"tag":1027,"props":8034,"children":8035},{"style":1068},[8036],{"type":999,"value":1700},{"type":993,"tag":1027,"props":8038,"children":8039},{"style":1054},[8040],{"type":999,"value":7474},{"type":993,"tag":1027,"props":8042,"children":8043},{"style":1068},[8044],{"type":999,"value":1710},{"type":993,"tag":1027,"props":8046,"children":8047},{"style":1273},[8048],{"type":999,"value":7483},{"type":993,"tag":1027,"props":8050,"children":8051},{"style":1068},[8052],{"type":999,"value":1700},{"type":993,"tag":1027,"props":8054,"children":8055},{"style":1054},[8056],{"type":999,"value":7492},{"type":993,"tag":1027,"props":8058,"children":8059},{"style":1068},[8060],{"type":999,"value":1710},{"type":993,"tag":1027,"props":8062,"children":8063},{"style":1273},[8064],{"type":999,"value":8065}," - XP: ",{"type":993,"tag":1027,"props":8067,"children":8068},{"style":1068},[8069],{"type":999,"value":1700},{"type":993,"tag":1027,"props":8071,"children":8072},{"style":1054},[8073],{"type":999,"value":8074},".experience",{"type":993,"tag":1027,"props":8076,"children":8077},{"style":1068},[8078],{"type":999,"value":1710},{"type":993,"tag":1027,"props":8080,"children":8081},{"style":1273},[8082],{"type":999,"value":1733},{"type":993,"tag":1027,"props":8084,"children":8085},{"class":1029,"line":320},[8086],{"type":993,"tag":1027,"props":8087,"children":8088},{"emptyLinePlaceholder":13},[8089],{"type":999,"value":1284},{"type":993,"tag":1027,"props":8091,"children":8092},{"class":1029,"line":329},[8093],{"type":993,"tag":1027,"props":8094,"children":8095},{"style":1033},[8096],{"type":999,"value":8097},"# Interactive character\n",{"type":993,"tag":1027,"props":8099,"children":8100},{"class":1029,"line":338},[8101,8106,8110,8115,8120],{"type":993,"tag":1027,"props":8102,"children":8103},{"style":1054},[8104],{"type":999,"value":8105},"hero ",{"type":993,"tag":1027,"props":8107,"children":8108},{"style":1042},[8109],{"type":999,"value":1094},{"type":993,"tag":1027,"props":8111,"children":8112},{"style":1054},[8113],{"type":999,"value":8114}," GameCharacter(",{"type":993,"tag":1027,"props":8116,"children":8117},{"style":1273},[8118],{"type":999,"value":8119},"\"Hero\"",{"type":993,"tag":1027,"props":8121,"children":8122},{"style":1054},[8123],{"type":999,"value":2077},{"type":993,"tag":1027,"props":8125,"children":8126},{"class":1029,"line":347},[8127,8131,8136,8140],{"type":993,"tag":1027,"props":8128,"children":8129},{"style":1068},[8130],{"type":999,"value":1309},{"type":993,"tag":1027,"props":8132,"children":8133},{"style":1054},[8134],{"type":999,"value":8135},"(hero.take_damage(",{"type":993,"tag":1027,"props":8137,"children":8138},{"style":1068},[8139],{"type":999,"value":2157},{"type":993,"tag":1027,"props":8141,"children":8142},{"style":1054},[8143],{"type":999,"value":2140},{"type":993,"tag":1027,"props":8145,"children":8146},{"class":1029,"line":356},[8147,8151,8156,8161],{"type":993,"tag":1027,"props":8148,"children":8149},{"style":1068},[8150],{"type":999,"value":1309},{"type":993,"tag":1027,"props":8152,"children":8153},{"style":1054},[8154],{"type":999,"value":8155},"(hero.heal(",{"type":993,"tag":1027,"props":8157,"children":8158},{"style":1068},[8159],{"type":999,"value":8160},"15",{"type":993,"tag":1027,"props":8162,"children":8163},{"style":1054},[8164],{"type":999,"value":2140},{"type":993,"tag":1027,"props":8166,"children":8167},{"class":1029,"line":365},[8168,8172,8177,8182],{"type":993,"tag":1027,"props":8169,"children":8170},{"style":1068},[8171],{"type":999,"value":1309},{"type":993,"tag":1027,"props":8173,"children":8174},{"style":1054},[8175],{"type":999,"value":8176},"(hero.gain_experience(",{"type":993,"tag":1027,"props":8178,"children":8179},{"style":1068},[8180],{"type":999,"value":8181},"150",{"type":993,"tag":1027,"props":8183,"children":8184},{"style":1054},[8185],{"type":999,"value":2140},{"type":993,"tag":1027,"props":8187,"children":8188},{"class":1029,"line":374},[8189,8193],{"type":993,"tag":1027,"props":8190,"children":8191},{"style":1068},[8192],{"type":999,"value":1309},{"type":993,"tag":1027,"props":8194,"children":8195},{"style":1054},[8196],{"type":999,"value":8197},"(hero.get_status())\n",{"type":993,"tag":1395,"props":8199,"children":8202},{"title":8200,"type":4252,"emoji":8201},"Best Practices","✅",[8203,8211,8234,8242,8265,8273],{"type":993,"tag":1002,"props":8204,"children":8205},{},[8206],{"type":993,"tag":1405,"props":8207,"children":8208},{},[8209],{"type":999,"value":8210},"Method Design:",{"type":993,"tag":1411,"props":8212,"children":8213},{},[8214,8219,8224,8229],{"type":993,"tag":1415,"props":8215,"children":8216},{},[8217],{"type":999,"value":8218},"Keep methods focused on single responsibilities",{"type":993,"tag":1415,"props":8220,"children":8221},{},[8222],{"type":999,"value":8223},"Use descriptive names that indicate what the method does",{"type":993,"tag":1415,"props":8225,"children":8226},{},[8227],{"type":999,"value":8228},"Return meaningful values for feedback and chaining",{"type":993,"tag":1415,"props":8230,"children":8231},{},[8232],{"type":999,"value":8233},"Handle edge cases gracefully",{"type":993,"tag":1002,"props":8235,"children":8236},{},[8237],{"type":993,"tag":1405,"props":8238,"children":8239},{},[8240],{"type":999,"value":8241},"Organization:",{"type":993,"tag":1411,"props":8243,"children":8244},{},[8245,8250,8255,8260],{"type":993,"tag":1415,"props":8246,"children":8247},{},[8248],{"type":999,"value":8249},"Group related methods together",{"type":993,"tag":1415,"props":8251,"children":8252},{},[8253],{"type":999,"value":8254},"Use consistent naming patterns",{"type":993,"tag":1415,"props":8256,"children":8257},{},[8258],{"type":999,"value":8259},"Document complex methods with docstrings",{"type":993,"tag":1415,"props":8261,"children":8262},{},[8263],{"type":999,"value":8264},"Consider the user's perspective when designing interfaces",{"type":993,"tag":1002,"props":8266,"children":8267},{},[8268],{"type":993,"tag":1405,"props":8269,"children":8270},{},[8271],{"type":999,"value":8272},"Error Handling:",{"type":993,"tag":1411,"props":8274,"children":8275},{},[8276,8281,8286,8291],{"type":993,"tag":1415,"props":8277,"children":8278},{},[8279],{"type":999,"value":8280},"Validate input parameters",{"type":993,"tag":1415,"props":8282,"children":8283},{},[8284],{"type":999,"value":8285},"Return error messages rather than crashing",{"type":993,"tag":1415,"props":8287,"children":8288},{},[8289],{"type":999,"value":8290},"Maintain object state consistency",{"type":993,"tag":1415,"props":8292,"children":8293},{},[8294],{"type":999,"value":8295},"Use appropriate return types for success/failure",{"type":993,"tag":8297,"props":8298,"children":8300},"content-exercise",{":widget-view":8299,"category":6,"id":693},"true",[],{"type":993,"tag":8302,"props":8303,"children":8306},"exercise",{"hint":8304,"prompt":8305},"Use instance attributes to store the current result, and return the result from each operation method","Create a simple Calculator class with methods for basic math operations. Include methods for addition, subtraction, multiplication, division, and getting the last result. Store the result of operations in the calculator.",[8307],{"type":993,"tag":1017,"props":8308,"children":8310},{"className":1019,"code":8309,"language":6,"meta":8,"style":8},"class Calculator:\n    def __init__(self):\n        # TODO: Initialize result attribute\n        pass\n    \n    def add(self, number):\n        # TODO: Add number to result\n        pass\n    \n    def subtract(self, number):\n        # TODO: Subtract number from result\n        pass\n    \n    def multiply(self, number):\n        # TODO: Multiply result by number\n        pass\n    \n    def divide(self, number):\n        # TODO: Divide result by number (handle division by zero)\n        pass\n    \n    def get_result(self):\n        # TODO: Return current result\n        pass\n    \n    def clear(self):\n        # TODO: Reset result to 0\n        pass\n\n# TODO: Test your calculator\ncalc = Calculator()\nprint(f\"Initial result: {calc.get_result()}\")\ncalc.add(10)\nprint(f\"After adding 10: {calc.get_result()}\")\ncalc.multiply(2)\nprint(f\"After multiplying by 2: {calc.get_result()}\")\ncalc.subtract(5)\nprint(f\"After subtracting 5: {calc.get_result()}\")\n",[8311],{"type":993,"tag":1023,"props":8312,"children":8313},{"__ignoreMap":8},[8314,8329,8344,8362,8370,8377,8392,8408,8415,8422,8438,8454,8461,8468,8483,8499,8506,8513,8529,8545,8552,8559,8575,8591,8598,8605,8620,8636,8643,8650,8667,8682,8723,8740,8780,8796,8836,8852],{"type":993,"tag":1027,"props":8315,"children":8316},{"class":1029,"line":12},[8317,8321,8325],{"type":993,"tag":1027,"props":8318,"children":8319},{"style":1042},[8320],{"type":999,"value":1045},{"type":993,"tag":1027,"props":8322,"children":8323},{"style":1048},[8324],{"type":999,"value":1051},{"type":993,"tag":1027,"props":8326,"children":8327},{"style":1054},[8328],{"type":999,"value":1057},{"type":993,"tag":1027,"props":8330,"children":8331},{"class":1029,"line":27},[8332,8336,8340],{"type":993,"tag":1027,"props":8333,"children":8334},{"style":1042},[8335],{"type":999,"value":1065},{"type":993,"tag":1027,"props":8337,"children":8338},{"style":1068},[8339],{"type":999,"value":1071},{"type":993,"tag":1027,"props":8341,"children":8342},{"style":1054},[8343],{"type":999,"value":1076},{"type":993,"tag":1027,"props":8345,"children":8346},{"class":1029,"line":36},[8347,8352,8357],{"type":993,"tag":1027,"props":8348,"children":8349},{"style":1033},[8350],{"type":999,"value":8351},"        # ",{"type":993,"tag":1027,"props":8353,"children":8354},{"style":1042},[8355],{"type":999,"value":8356},"TODO",{"type":993,"tag":1027,"props":8358,"children":8359},{"style":1033},[8360],{"type":999,"value":8361},": Initialize result attribute\n",{"type":993,"tag":1027,"props":8363,"children":8364},{"class":1029,"line":45},[8365],{"type":993,"tag":1027,"props":8366,"children":8367},{"style":1042},[8368],{"type":999,"value":8369},"        pass\n",{"type":993,"tag":1027,"props":8371,"children":8372},{"class":1029,"line":54},[8373],{"type":993,"tag":1027,"props":8374,"children":8375},{"style":1054},[8376],{"type":999,"value":1107},{"type":993,"tag":1027,"props":8378,"children":8379},{"class":1029,"line":63},[8380,8384,8388],{"type":993,"tag":1027,"props":8381,"children":8382},{"style":1042},[8383],{"type":999,"value":1065},{"type":993,"tag":1027,"props":8385,"children":8386},{"style":1048},[8387],{"type":999,"value":1119},{"type":993,"tag":1027,"props":8389,"children":8390},{"style":1054},[8391],{"type":999,"value":1124},{"type":993,"tag":1027,"props":8393,"children":8394},{"class":1029,"line":72},[8395,8399,8403],{"type":993,"tag":1027,"props":8396,"children":8397},{"style":1033},[8398],{"type":999,"value":8351},{"type":993,"tag":1027,"props":8400,"children":8401},{"style":1042},[8402],{"type":999,"value":8356},{"type":993,"tag":1027,"props":8404,"children":8405},{"style":1033},[8406],{"type":999,"value":8407},": Add number to result\n",{"type":993,"tag":1027,"props":8409,"children":8410},{"class":1029,"line":81},[8411],{"type":993,"tag":1027,"props":8412,"children":8413},{"style":1042},[8414],{"type":999,"value":8369},{"type":993,"tag":1027,"props":8416,"children":8417},{"class":1029,"line":91},[8418],{"type":993,"tag":1027,"props":8419,"children":8420},{"style":1054},[8421],{"type":999,"value":1107},{"type":993,"tag":1027,"props":8423,"children":8424},{"class":1029,"line":100},[8425,8429,8434],{"type":993,"tag":1027,"props":8426,"children":8427},{"style":1042},[8428],{"type":999,"value":1065},{"type":993,"tag":1027,"props":8430,"children":8431},{"style":1048},[8432],{"type":999,"value":8433}," subtract",{"type":993,"tag":1027,"props":8435,"children":8436},{"style":1054},[8437],{"type":999,"value":1124},{"type":993,"tag":1027,"props":8439,"children":8440},{"class":1029,"line":109},[8441,8445,8449],{"type":993,"tag":1027,"props":8442,"children":8443},{"style":1033},[8444],{"type":999,"value":8351},{"type":993,"tag":1027,"props":8446,"children":8447},{"style":1042},[8448],{"type":999,"value":8356},{"type":993,"tag":1027,"props":8450,"children":8451},{"style":1033},[8452],{"type":999,"value":8453},": Subtract number from result\n",{"type":993,"tag":1027,"props":8455,"children":8456},{"class":1029,"line":118},[8457],{"type":993,"tag":1027,"props":8458,"children":8459},{"style":1042},[8460],{"type":999,"value":8369},{"type":993,"tag":1027,"props":8462,"children":8463},{"class":1029,"line":127},[8464],{"type":993,"tag":1027,"props":8465,"children":8466},{"style":1054},[8467],{"type":999,"value":1107},{"type":993,"tag":1027,"props":8469,"children":8470},{"class":1029,"line":136},[8471,8475,8479],{"type":993,"tag":1027,"props":8472,"children":8473},{"style":1042},[8474],{"type":999,"value":1065},{"type":993,"tag":1027,"props":8476,"children":8477},{"style":1048},[8478],{"type":999,"value":1182},{"type":993,"tag":1027,"props":8480,"children":8481},{"style":1054},[8482],{"type":999,"value":1124},{"type":993,"tag":1027,"props":8484,"children":8485},{"class":1029,"line":146},[8486,8490,8494],{"type":993,"tag":1027,"props":8487,"children":8488},{"style":1033},[8489],{"type":999,"value":8351},{"type":993,"tag":1027,"props":8491,"children":8492},{"style":1042},[8493],{"type":999,"value":8356},{"type":993,"tag":1027,"props":8495,"children":8496},{"style":1033},[8497],{"type":999,"value":8498},": Multiply result by number\n",{"type":993,"tag":1027,"props":8500,"children":8501},{"class":1029,"line":155},[8502],{"type":993,"tag":1027,"props":8503,"children":8504},{"style":1042},[8505],{"type":999,"value":8369},{"type":993,"tag":1027,"props":8507,"children":8508},{"class":1029,"line":164},[8509],{"type":993,"tag":1027,"props":8510,"children":8511},{"style":1054},[8512],{"type":999,"value":1107},{"type":993,"tag":1027,"props":8514,"children":8515},{"class":1029,"line":173},[8516,8520,8525],{"type":993,"tag":1027,"props":8517,"children":8518},{"style":1042},[8519],{"type":999,"value":1065},{"type":993,"tag":1027,"props":8521,"children":8522},{"style":1048},[8523],{"type":999,"value":8524}," divide",{"type":993,"tag":1027,"props":8526,"children":8527},{"style":1054},[8528],{"type":999,"value":1124},{"type":993,"tag":1027,"props":8530,"children":8531},{"class":1029,"line":182},[8532,8536,8540],{"type":993,"tag":1027,"props":8533,"children":8534},{"style":1033},[8535],{"type":999,"value":8351},{"type":993,"tag":1027,"props":8537,"children":8538},{"style":1042},[8539],{"type":999,"value":8356},{"type":993,"tag":1027,"props":8541,"children":8542},{"style":1033},[8543],{"type":999,"value":8544},": Divide result by number (handle division by zero)\n",{"type":993,"tag":1027,"props":8546,"children":8547},{"class":1029,"line":191},[8548],{"type":993,"tag":1027,"props":8549,"children":8550},{"style":1042},[8551],{"type":999,"value":8369},{"type":993,"tag":1027,"props":8553,"children":8554},{"class":1029,"line":201},[8555],{"type":993,"tag":1027,"props":8556,"children":8557},{"style":1054},[8558],{"type":999,"value":1107},{"type":993,"tag":1027,"props":8560,"children":8561},{"class":1029,"line":210},[8562,8566,8571],{"type":993,"tag":1027,"props":8563,"children":8564},{"style":1042},[8565],{"type":999,"value":1065},{"type":993,"tag":1027,"props":8567,"children":8568},{"style":1048},[8569],{"type":999,"value":8570}," get_result",{"type":993,"tag":1027,"props":8572,"children":8573},{"style":1054},[8574],{"type":999,"value":1076},{"type":993,"tag":1027,"props":8576,"children":8577},{"class":1029,"line":219},[8578,8582,8586],{"type":993,"tag":1027,"props":8579,"children":8580},{"style":1033},[8581],{"type":999,"value":8351},{"type":993,"tag":1027,"props":8583,"children":8584},{"style":1042},[8585],{"type":999,"value":8356},{"type":993,"tag":1027,"props":8587,"children":8588},{"style":1033},[8589],{"type":999,"value":8590},": Return current result\n",{"type":993,"tag":1027,"props":8592,"children":8593},{"class":1029,"line":228},[8594],{"type":993,"tag":1027,"props":8595,"children":8596},{"style":1042},[8597],{"type":999,"value":8369},{"type":993,"tag":1027,"props":8599,"children":8600},{"class":1029,"line":238},[8601],{"type":993,"tag":1027,"props":8602,"children":8603},{"style":1054},[8604],{"type":999,"value":1107},{"type":993,"tag":1027,"props":8606,"children":8607},{"class":1029,"line":247},[8608,8612,8616],{"type":993,"tag":1027,"props":8609,"children":8610},{"style":1042},[8611],{"type":999,"value":1065},{"type":993,"tag":1027,"props":8613,"children":8614},{"style":1048},[8615],{"type":999,"value":1240},{"type":993,"tag":1027,"props":8617,"children":8618},{"style":1054},[8619],{"type":999,"value":1076},{"type":993,"tag":1027,"props":8621,"children":8622},{"class":1029,"line":256},[8623,8627,8631],{"type":993,"tag":1027,"props":8624,"children":8625},{"style":1033},[8626],{"type":999,"value":8351},{"type":993,"tag":1027,"props":8628,"children":8629},{"style":1042},[8630],{"type":999,"value":8356},{"type":993,"tag":1027,"props":8632,"children":8633},{"style":1033},[8634],{"type":999,"value":8635},": Reset result to 0\n",{"type":993,"tag":1027,"props":8637,"children":8638},{"class":1029,"line":265},[8639],{"type":993,"tag":1027,"props":8640,"children":8641},{"style":1042},[8642],{"type":999,"value":8369},{"type":993,"tag":1027,"props":8644,"children":8645},{"class":1029,"line":274},[8646],{"type":993,"tag":1027,"props":8647,"children":8648},{"emptyLinePlaceholder":13},[8649],{"type":999,"value":1284},{"type":993,"tag":1027,"props":8651,"children":8652},{"class":1029,"line":284},[8653,8658,8662],{"type":993,"tag":1027,"props":8654,"children":8655},{"style":1033},[8656],{"type":999,"value":8657},"# ",{"type":993,"tag":1027,"props":8659,"children":8660},{"style":1042},[8661],{"type":999,"value":8356},{"type":993,"tag":1027,"props":8663,"children":8664},{"style":1033},[8665],{"type":999,"value":8666},": Test your calculator\n",{"type":993,"tag":1027,"props":8668,"children":8669},{"class":1029,"line":293},[8670,8674,8678],{"type":993,"tag":1027,"props":8671,"children":8672},{"style":1054},[8673],{"type":999,"value":1292},{"type":993,"tag":1027,"props":8675,"children":8676},{"style":1042},[8677],{"type":999,"value":1094},{"type":993,"tag":1027,"props":8679,"children":8680},{"style":1054},[8681],{"type":999,"value":1301},{"type":993,"tag":1027,"props":8683,"children":8684},{"class":1029,"line":302},[8685,8689,8693,8697,8702,8706,8711,8715,8719],{"type":993,"tag":1027,"props":8686,"children":8687},{"style":1068},[8688],{"type":999,"value":1309},{"type":993,"tag":1027,"props":8690,"children":8691},{"style":1054},[8692],{"type":999,"value":4027},{"type":993,"tag":1027,"props":8694,"children":8695},{"style":1042},[8696],{"type":999,"value":4150},{"type":993,"tag":1027,"props":8698,"children":8699},{"style":1273},[8700],{"type":999,"value":8701},"\"Initial result: ",{"type":993,"tag":1027,"props":8703,"children":8704},{"style":1068},[8705],{"type":999,"value":1832},{"type":993,"tag":1027,"props":8707,"children":8708},{"style":1054},[8709],{"type":999,"value":8710},"calc.get_result()",{"type":993,"tag":1027,"props":8712,"children":8713},{"style":1068},[8714],{"type":999,"value":1710},{"type":993,"tag":1027,"props":8716,"children":8717},{"style":1273},[8718],{"type":999,"value":1695},{"type":993,"tag":1027,"props":8720,"children":8721},{"style":1054},[8722],{"type":999,"value":2077},{"type":993,"tag":1027,"props":8724,"children":8725},{"class":1029,"line":311},[8726,8731,8736],{"type":993,"tag":1027,"props":8727,"children":8728},{"style":1054},[8729],{"type":999,"value":8730},"calc.add(",{"type":993,"tag":1027,"props":8732,"children":8733},{"style":1068},[8734],{"type":999,"value":8735},"10",{"type":993,"tag":1027,"props":8737,"children":8738},{"style":1054},[8739],{"type":999,"value":2077},{"type":993,"tag":1027,"props":8741,"children":8742},{"class":1029,"line":320},[8743,8747,8751,8755,8760,8764,8768,8772,8776],{"type":993,"tag":1027,"props":8744,"children":8745},{"style":1068},[8746],{"type":999,"value":1309},{"type":993,"tag":1027,"props":8748,"children":8749},{"style":1054},[8750],{"type":999,"value":4027},{"type":993,"tag":1027,"props":8752,"children":8753},{"style":1042},[8754],{"type":999,"value":4150},{"type":993,"tag":1027,"props":8756,"children":8757},{"style":1273},[8758],{"type":999,"value":8759},"\"After adding 10: ",{"type":993,"tag":1027,"props":8761,"children":8762},{"style":1068},[8763],{"type":999,"value":1832},{"type":993,"tag":1027,"props":8765,"children":8766},{"style":1054},[8767],{"type":999,"value":8710},{"type":993,"tag":1027,"props":8769,"children":8770},{"style":1068},[8771],{"type":999,"value":1710},{"type":993,"tag":1027,"props":8773,"children":8774},{"style":1273},[8775],{"type":999,"value":1695},{"type":993,"tag":1027,"props":8777,"children":8778},{"style":1054},[8779],{"type":999,"value":2077},{"type":993,"tag":1027,"props":8781,"children":8782},{"class":1029,"line":329},[8783,8788,8792],{"type":993,"tag":1027,"props":8784,"children":8785},{"style":1054},[8786],{"type":999,"value":8787},"calc.multiply(",{"type":993,"tag":1027,"props":8789,"children":8790},{"style":1068},[8791],{"type":999,"value":3294},{"type":993,"tag":1027,"props":8793,"children":8794},{"style":1054},[8795],{"type":999,"value":2077},{"type":993,"tag":1027,"props":8797,"children":8798},{"class":1029,"line":338},[8799,8803,8807,8811,8816,8820,8824,8828,8832],{"type":993,"tag":1027,"props":8800,"children":8801},{"style":1068},[8802],{"type":999,"value":1309},{"type":993,"tag":1027,"props":8804,"children":8805},{"style":1054},[8806],{"type":999,"value":4027},{"type":993,"tag":1027,"props":8808,"children":8809},{"style":1042},[8810],{"type":999,"value":4150},{"type":993,"tag":1027,"props":8812,"children":8813},{"style":1273},[8814],{"type":999,"value":8815},"\"After multiplying by 2: ",{"type":993,"tag":1027,"props":8817,"children":8818},{"style":1068},[8819],{"type":999,"value":1832},{"type":993,"tag":1027,"props":8821,"children":8822},{"style":1054},[8823],{"type":999,"value":8710},{"type":993,"tag":1027,"props":8825,"children":8826},{"style":1068},[8827],{"type":999,"value":1710},{"type":993,"tag":1027,"props":8829,"children":8830},{"style":1273},[8831],{"type":999,"value":1695},{"type":993,"tag":1027,"props":8833,"children":8834},{"style":1054},[8835],{"type":999,"value":2077},{"type":993,"tag":1027,"props":8837,"children":8838},{"class":1029,"line":347},[8839,8844,8848],{"type":993,"tag":1027,"props":8840,"children":8841},{"style":1054},[8842],{"type":999,"value":8843},"calc.subtract(",{"type":993,"tag":1027,"props":8845,"children":8846},{"style":1068},[8847],{"type":999,"value":1319},{"type":993,"tag":1027,"props":8849,"children":8850},{"style":1054},[8851],{"type":999,"value":2077},{"type":993,"tag":1027,"props":8853,"children":8854},{"class":1029,"line":356},[8855,8859,8863,8867,8872,8876,8880,8884,8888],{"type":993,"tag":1027,"props":8856,"children":8857},{"style":1068},[8858],{"type":999,"value":1309},{"type":993,"tag":1027,"props":8860,"children":8861},{"style":1054},[8862],{"type":999,"value":4027},{"type":993,"tag":1027,"props":8864,"children":8865},{"style":1042},[8866],{"type":999,"value":4150},{"type":993,"tag":1027,"props":8868,"children":8869},{"style":1273},[8870],{"type":999,"value":8871},"\"After subtracting 5: ",{"type":993,"tag":1027,"props":8873,"children":8874},{"style":1068},[8875],{"type":999,"value":1832},{"type":993,"tag":1027,"props":8877,"children":8878},{"style":1054},[8879],{"type":999,"value":8710},{"type":993,"tag":1027,"props":8881,"children":8882},{"style":1068},[8883],{"type":999,"value":1710},{"type":993,"tag":1027,"props":8885,"children":8886},{"style":1273},[8887],{"type":999,"value":1695},{"type":993,"tag":1027,"props":8889,"children":8890},{"style":1054},[8891],{"type":999,"value":2077},{"type":993,"tag":1534,"props":8893,"children":8895},{"id":8894},"solution-and-explanation",[8896],{"type":999,"value":8897},"Solution and Explanation 💡",{"type":993,"tag":8899,"props":8900,"children":8901},"details",{},[8902,8910,9646,9654],{"type":993,"tag":8903,"props":8904,"children":8907},"summary",{"className":8905},[8906],"cursor-pointer",[8908],{"type":999,"value":8909},"Click to see the complete solution",{"type":993,"tag":1013,"props":8911,"children":8912},{},[8913],{"type":993,"tag":1017,"props":8914,"children":8916},{"className":1019,"code":8915,"language":6,"meta":8,"style":8},"class Calculator:\n    def __init__(self):\n        # Initialize result attribute\n        self.result = 0\n    \n    def add(self, number):\n        # Add number to result\n        self.result += number\n        return self.result\n    \n    def subtract(self, number):\n        # Subtract number from result\n        self.result -= number\n        return self.result\n    \n    def multiply(self, number):\n        # Multiply result by number\n        self.result *= number\n        return self.result\n    \n    def divide(self, number):\n        # Divide result by number (handle division by zero)\n        if number != 0:\n            self.result /= number\n            return self.result\n        else:\n            print(\"Error: Cannot divide by zero\")\n            return self.result\n    \n    def get_result(self):\n        # Return current result\n        return self.result\n    \n    def clear(self):\n        # Reset result to 0\n        self.result = 0\n        return self.result\n\n# Test your calculator\ncalc = Calculator()\nprint(f\"Initial result: {calc.get_result()}\")\ncalc.add(10)\nprint(f\"After adding 10: {calc.get_result()}\")\ncalc.multiply(2)\nprint(f\"After multiplying by 2: {calc.get_result()}\")\ncalc.subtract(5)\nprint(f\"After subtracting 5: {calc.get_result()}\")\n",[8917],{"type":993,"tag":1023,"props":8918,"children":8919},{"__ignoreMap":8},[8920,8935,8950,8958,8977,8984,8999,9007,9026,9041,9048,9063,9071,9090,9105,9112,9127,9135,9154,9169,9176,9191,9199,9224,9244,9259,9270,9291,9306,9313,9328,9336,9351,9358,9373,9381,9400,9415,9422,9430,9445,9484,9499,9538,9553,9592,9607],{"type":993,"tag":1027,"props":8921,"children":8922},{"class":1029,"line":12},[8923,8927,8931],{"type":993,"tag":1027,"props":8924,"children":8925},{"style":1042},[8926],{"type":999,"value":1045},{"type":993,"tag":1027,"props":8928,"children":8929},{"style":1048},[8930],{"type":999,"value":1051},{"type":993,"tag":1027,"props":8932,"children":8933},{"style":1054},[8934],{"type":999,"value":1057},{"type":993,"tag":1027,"props":8936,"children":8937},{"class":1029,"line":27},[8938,8942,8946],{"type":993,"tag":1027,"props":8939,"children":8940},{"style":1042},[8941],{"type":999,"value":1065},{"type":993,"tag":1027,"props":8943,"children":8944},{"style":1068},[8945],{"type":999,"value":1071},{"type":993,"tag":1027,"props":8947,"children":8948},{"style":1054},[8949],{"type":999,"value":1076},{"type":993,"tag":1027,"props":8951,"children":8952},{"class":1029,"line":36},[8953],{"type":993,"tag":1027,"props":8954,"children":8955},{"style":1033},[8956],{"type":999,"value":8957},"        # Initialize result attribute\n",{"type":993,"tag":1027,"props":8959,"children":8960},{"class":1029,"line":45},[8961,8965,8969,8973],{"type":993,"tag":1027,"props":8962,"children":8963},{"style":1068},[8964],{"type":999,"value":1084},{"type":993,"tag":1027,"props":8966,"children":8967},{"style":1054},[8968],{"type":999,"value":1089},{"type":993,"tag":1027,"props":8970,"children":8971},{"style":1042},[8972],{"type":999,"value":1094},{"type":993,"tag":1027,"props":8974,"children":8975},{"style":1068},[8976],{"type":999,"value":1099},{"type":993,"tag":1027,"props":8978,"children":8979},{"class":1029,"line":54},[8980],{"type":993,"tag":1027,"props":8981,"children":8982},{"style":1054},[8983],{"type":999,"value":1107},{"type":993,"tag":1027,"props":8985,"children":8986},{"class":1029,"line":63},[8987,8991,8995],{"type":993,"tag":1027,"props":8988,"children":8989},{"style":1042},[8990],{"type":999,"value":1065},{"type":993,"tag":1027,"props":8992,"children":8993},{"style":1048},[8994],{"type":999,"value":1119},{"type":993,"tag":1027,"props":8996,"children":8997},{"style":1054},[8998],{"type":999,"value":1124},{"type":993,"tag":1027,"props":9000,"children":9001},{"class":1029,"line":72},[9002],{"type":993,"tag":1027,"props":9003,"children":9004},{"style":1033},[9005],{"type":999,"value":9006},"        # Add number to result\n",{"type":993,"tag":1027,"props":9008,"children":9009},{"class":1029,"line":81},[9010,9014,9018,9022],{"type":993,"tag":1027,"props":9011,"children":9012},{"style":1068},[9013],{"type":999,"value":1084},{"type":993,"tag":1027,"props":9015,"children":9016},{"style":1054},[9017],{"type":999,"value":1089},{"type":993,"tag":1027,"props":9019,"children":9020},{"style":1042},[9021],{"type":999,"value":1140},{"type":993,"tag":1027,"props":9023,"children":9024},{"style":1054},[9025],{"type":999,"value":1145},{"type":993,"tag":1027,"props":9027,"children":9028},{"class":1029,"line":91},[9029,9033,9037],{"type":993,"tag":1027,"props":9030,"children":9031},{"style":1042},[9032],{"type":999,"value":1153},{"type":993,"tag":1027,"props":9034,"children":9035},{"style":1068},[9036],{"type":999,"value":1158},{"type":993,"tag":1027,"props":9038,"children":9039},{"style":1054},[9040],{"type":999,"value":1163},{"type":993,"tag":1027,"props":9042,"children":9043},{"class":1029,"line":100},[9044],{"type":993,"tag":1027,"props":9045,"children":9046},{"style":1054},[9047],{"type":999,"value":1107},{"type":993,"tag":1027,"props":9049,"children":9050},{"class":1029,"line":109},[9051,9055,9059],{"type":993,"tag":1027,"props":9052,"children":9053},{"style":1042},[9054],{"type":999,"value":1065},{"type":993,"tag":1027,"props":9056,"children":9057},{"style":1048},[9058],{"type":999,"value":8433},{"type":993,"tag":1027,"props":9060,"children":9061},{"style":1054},[9062],{"type":999,"value":1124},{"type":993,"tag":1027,"props":9064,"children":9065},{"class":1029,"line":118},[9066],{"type":993,"tag":1027,"props":9067,"children":9068},{"style":1033},[9069],{"type":999,"value":9070},"        # Subtract number from result\n",{"type":993,"tag":1027,"props":9072,"children":9073},{"class":1029,"line":127},[9074,9078,9082,9086],{"type":993,"tag":1027,"props":9075,"children":9076},{"style":1068},[9077],{"type":999,"value":1084},{"type":993,"tag":1027,"props":9079,"children":9080},{"style":1054},[9081],{"type":999,"value":1089},{"type":993,"tag":1027,"props":9083,"children":9084},{"style":1042},[9085],{"type":999,"value":1944},{"type":993,"tag":1027,"props":9087,"children":9088},{"style":1054},[9089],{"type":999,"value":1145},{"type":993,"tag":1027,"props":9091,"children":9092},{"class":1029,"line":136},[9093,9097,9101],{"type":993,"tag":1027,"props":9094,"children":9095},{"style":1042},[9096],{"type":999,"value":1153},{"type":993,"tag":1027,"props":9098,"children":9099},{"style":1068},[9100],{"type":999,"value":1158},{"type":993,"tag":1027,"props":9102,"children":9103},{"style":1054},[9104],{"type":999,"value":1163},{"type":993,"tag":1027,"props":9106,"children":9107},{"class":1029,"line":146},[9108],{"type":993,"tag":1027,"props":9109,"children":9110},{"style":1054},[9111],{"type":999,"value":1107},{"type":993,"tag":1027,"props":9113,"children":9114},{"class":1029,"line":155},[9115,9119,9123],{"type":993,"tag":1027,"props":9116,"children":9117},{"style":1042},[9118],{"type":999,"value":1065},{"type":993,"tag":1027,"props":9120,"children":9121},{"style":1048},[9122],{"type":999,"value":1182},{"type":993,"tag":1027,"props":9124,"children":9125},{"style":1054},[9126],{"type":999,"value":1124},{"type":993,"tag":1027,"props":9128,"children":9129},{"class":1029,"line":164},[9130],{"type":993,"tag":1027,"props":9131,"children":9132},{"style":1033},[9133],{"type":999,"value":9134},"        # Multiply result by number\n",{"type":993,"tag":1027,"props":9136,"children":9137},{"class":1029,"line":173},[9138,9142,9146,9150],{"type":993,"tag":1027,"props":9139,"children":9140},{"style":1068},[9141],{"type":999,"value":1084},{"type":993,"tag":1027,"props":9143,"children":9144},{"style":1054},[9145],{"type":999,"value":1089},{"type":993,"tag":1027,"props":9147,"children":9148},{"style":1042},[9149],{"type":999,"value":1202},{"type":993,"tag":1027,"props":9151,"children":9152},{"style":1054},[9153],{"type":999,"value":1145},{"type":993,"tag":1027,"props":9155,"children":9156},{"class":1029,"line":182},[9157,9161,9165],{"type":993,"tag":1027,"props":9158,"children":9159},{"style":1042},[9160],{"type":999,"value":1153},{"type":993,"tag":1027,"props":9162,"children":9163},{"style":1068},[9164],{"type":999,"value":1158},{"type":993,"tag":1027,"props":9166,"children":9167},{"style":1054},[9168],{"type":999,"value":1163},{"type":993,"tag":1027,"props":9170,"children":9171},{"class":1029,"line":191},[9172],{"type":993,"tag":1027,"props":9173,"children":9174},{"style":1054},[9175],{"type":999,"value":1107},{"type":993,"tag":1027,"props":9177,"children":9178},{"class":1029,"line":201},[9179,9183,9187],{"type":993,"tag":1027,"props":9180,"children":9181},{"style":1042},[9182],{"type":999,"value":1065},{"type":993,"tag":1027,"props":9184,"children":9185},{"style":1048},[9186],{"type":999,"value":8524},{"type":993,"tag":1027,"props":9188,"children":9189},{"style":1054},[9190],{"type":999,"value":1124},{"type":993,"tag":1027,"props":9192,"children":9193},{"class":1029,"line":210},[9194],{"type":993,"tag":1027,"props":9195,"children":9196},{"style":1033},[9197],{"type":999,"value":9198},"        # Divide result by number (handle division by zero)\n",{"type":993,"tag":1027,"props":9200,"children":9201},{"class":1029,"line":219},[9202,9206,9211,9216,9220],{"type":993,"tag":1027,"props":9203,"children":9204},{"style":1042},[9205],{"type":999,"value":1770},{"type":993,"tag":1027,"props":9207,"children":9208},{"style":1054},[9209],{"type":999,"value":9210}," number ",{"type":993,"tag":1027,"props":9212,"children":9213},{"style":1042},[9214],{"type":999,"value":9215},"!=",{"type":993,"tag":1027,"props":9217,"children":9218},{"style":1068},[9219],{"type":999,"value":1785},{"type":993,"tag":1027,"props":9221,"children":9222},{"style":1054},[9223],{"type":999,"value":1057},{"type":993,"tag":1027,"props":9225,"children":9226},{"class":1029,"line":228},[9227,9231,9235,9240],{"type":993,"tag":1027,"props":9228,"children":9229},{"style":1068},[9230],{"type":999,"value":1797},{"type":993,"tag":1027,"props":9232,"children":9233},{"style":1054},[9234],{"type":999,"value":1089},{"type":993,"tag":1027,"props":9236,"children":9237},{"style":1042},[9238],{"type":999,"value":9239},"/=",{"type":993,"tag":1027,"props":9241,"children":9242},{"style":1054},[9243],{"type":999,"value":1145},{"type":993,"tag":1027,"props":9245,"children":9246},{"class":1029,"line":238},[9247,9251,9255],{"type":993,"tag":1027,"props":9248,"children":9249},{"style":1042},[9250],{"type":999,"value":1818},{"type":993,"tag":1027,"props":9252,"children":9253},{"style":1068},[9254],{"type":999,"value":1158},{"type":993,"tag":1027,"props":9256,"children":9257},{"style":1054},[9258],{"type":999,"value":1163},{"type":993,"tag":1027,"props":9260,"children":9261},{"class":1029,"line":247},[9262,9266],{"type":993,"tag":1027,"props":9263,"children":9264},{"style":1042},[9265],{"type":999,"value":3541},{"type":993,"tag":1027,"props":9267,"children":9268},{"style":1054},[9269],{"type":999,"value":1057},{"type":993,"tag":1027,"props":9271,"children":9272},{"class":1029,"line":256},[9273,9278,9282,9287],{"type":993,"tag":1027,"props":9274,"children":9275},{"style":1068},[9276],{"type":999,"value":9277},"            print",{"type":993,"tag":1027,"props":9279,"children":9280},{"style":1054},[9281],{"type":999,"value":4027},{"type":993,"tag":1027,"props":9283,"children":9284},{"style":1273},[9285],{"type":999,"value":9286},"\"Error: Cannot divide by zero\"",{"type":993,"tag":1027,"props":9288,"children":9289},{"style":1054},[9290],{"type":999,"value":2077},{"type":993,"tag":1027,"props":9292,"children":9293},{"class":1029,"line":265},[9294,9298,9302],{"type":993,"tag":1027,"props":9295,"children":9296},{"style":1042},[9297],{"type":999,"value":1818},{"type":993,"tag":1027,"props":9299,"children":9300},{"style":1068},[9301],{"type":999,"value":1158},{"type":993,"tag":1027,"props":9303,"children":9304},{"style":1054},[9305],{"type":999,"value":1163},{"type":993,"tag":1027,"props":9307,"children":9308},{"class":1029,"line":274},[9309],{"type":993,"tag":1027,"props":9310,"children":9311},{"style":1054},[9312],{"type":999,"value":1107},{"type":993,"tag":1027,"props":9314,"children":9315},{"class":1029,"line":284},[9316,9320,9324],{"type":993,"tag":1027,"props":9317,"children":9318},{"style":1042},[9319],{"type":999,"value":1065},{"type":993,"tag":1027,"props":9321,"children":9322},{"style":1048},[9323],{"type":999,"value":8570},{"type":993,"tag":1027,"props":9325,"children":9326},{"style":1054},[9327],{"type":999,"value":1076},{"type":993,"tag":1027,"props":9329,"children":9330},{"class":1029,"line":293},[9331],{"type":993,"tag":1027,"props":9332,"children":9333},{"style":1033},[9334],{"type":999,"value":9335},"        # Return current result\n",{"type":993,"tag":1027,"props":9337,"children":9338},{"class":1029,"line":302},[9339,9343,9347],{"type":993,"tag":1027,"props":9340,"children":9341},{"style":1042},[9342],{"type":999,"value":1153},{"type":993,"tag":1027,"props":9344,"children":9345},{"style":1068},[9346],{"type":999,"value":1158},{"type":993,"tag":1027,"props":9348,"children":9349},{"style":1054},[9350],{"type":999,"value":1163},{"type":993,"tag":1027,"props":9352,"children":9353},{"class":1029,"line":311},[9354],{"type":993,"tag":1027,"props":9355,"children":9356},{"style":1054},[9357],{"type":999,"value":1107},{"type":993,"tag":1027,"props":9359,"children":9360},{"class":1029,"line":320},[9361,9365,9369],{"type":993,"tag":1027,"props":9362,"children":9363},{"style":1042},[9364],{"type":999,"value":1065},{"type":993,"tag":1027,"props":9366,"children":9367},{"style":1048},[9368],{"type":999,"value":1240},{"type":993,"tag":1027,"props":9370,"children":9371},{"style":1054},[9372],{"type":999,"value":1076},{"type":993,"tag":1027,"props":9374,"children":9375},{"class":1029,"line":329},[9376],{"type":993,"tag":1027,"props":9377,"children":9378},{"style":1033},[9379],{"type":999,"value":9380},"        # Reset result to 0\n",{"type":993,"tag":1027,"props":9382,"children":9383},{"class":1029,"line":338},[9384,9388,9392,9396],{"type":993,"tag":1027,"props":9385,"children":9386},{"style":1068},[9387],{"type":999,"value":1084},{"type":993,"tag":1027,"props":9389,"children":9390},{"style":1054},[9391],{"type":999,"value":1089},{"type":993,"tag":1027,"props":9393,"children":9394},{"style":1042},[9395],{"type":999,"value":1094},{"type":993,"tag":1027,"props":9397,"children":9398},{"style":1068},[9399],{"type":999,"value":1099},{"type":993,"tag":1027,"props":9401,"children":9402},{"class":1029,"line":347},[9403,9407,9411],{"type":993,"tag":1027,"props":9404,"children":9405},{"style":1042},[9406],{"type":999,"value":1153},{"type":993,"tag":1027,"props":9408,"children":9409},{"style":1068},[9410],{"type":999,"value":1158},{"type":993,"tag":1027,"props":9412,"children":9413},{"style":1054},[9414],{"type":999,"value":1163},{"type":993,"tag":1027,"props":9416,"children":9417},{"class":1029,"line":356},[9418],{"type":993,"tag":1027,"props":9419,"children":9420},{"emptyLinePlaceholder":13},[9421],{"type":999,"value":1284},{"type":993,"tag":1027,"props":9423,"children":9424},{"class":1029,"line":365},[9425],{"type":993,"tag":1027,"props":9426,"children":9427},{"style":1033},[9428],{"type":999,"value":9429},"# Test your calculator\n",{"type":993,"tag":1027,"props":9431,"children":9432},{"class":1029,"line":374},[9433,9437,9441],{"type":993,"tag":1027,"props":9434,"children":9435},{"style":1054},[9436],{"type":999,"value":1292},{"type":993,"tag":1027,"props":9438,"children":9439},{"style":1042},[9440],{"type":999,"value":1094},{"type":993,"tag":1027,"props":9442,"children":9443},{"style":1054},[9444],{"type":999,"value":1301},{"type":993,"tag":1027,"props":9446,"children":9447},{"class":1029,"line":384},[9448,9452,9456,9460,9464,9468,9472,9476,9480],{"type":993,"tag":1027,"props":9449,"children":9450},{"style":1068},[9451],{"type":999,"value":1309},{"type":993,"tag":1027,"props":9453,"children":9454},{"style":1054},[9455],{"type":999,"value":4027},{"type":993,"tag":1027,"props":9457,"children":9458},{"style":1042},[9459],{"type":999,"value":4150},{"type":993,"tag":1027,"props":9461,"children":9462},{"style":1273},[9463],{"type":999,"value":8701},{"type":993,"tag":1027,"props":9465,"children":9466},{"style":1068},[9467],{"type":999,"value":1832},{"type":993,"tag":1027,"props":9469,"children":9470},{"style":1054},[9471],{"type":999,"value":8710},{"type":993,"tag":1027,"props":9473,"children":9474},{"style":1068},[9475],{"type":999,"value":1710},{"type":993,"tag":1027,"props":9477,"children":9478},{"style":1273},[9479],{"type":999,"value":1695},{"type":993,"tag":1027,"props":9481,"children":9482},{"style":1054},[9483],{"type":999,"value":2077},{"type":993,"tag":1027,"props":9485,"children":9486},{"class":1029,"line":393},[9487,9491,9495],{"type":993,"tag":1027,"props":9488,"children":9489},{"style":1054},[9490],{"type":999,"value":8730},{"type":993,"tag":1027,"props":9492,"children":9493},{"style":1068},[9494],{"type":999,"value":8735},{"type":993,"tag":1027,"props":9496,"children":9497},{"style":1054},[9498],{"type":999,"value":2077},{"type":993,"tag":1027,"props":9500,"children":9501},{"class":1029,"line":402},[9502,9506,9510,9514,9518,9522,9526,9530,9534],{"type":993,"tag":1027,"props":9503,"children":9504},{"style":1068},[9505],{"type":999,"value":1309},{"type":993,"tag":1027,"props":9507,"children":9508},{"style":1054},[9509],{"type":999,"value":4027},{"type":993,"tag":1027,"props":9511,"children":9512},{"style":1042},[9513],{"type":999,"value":4150},{"type":993,"tag":1027,"props":9515,"children":9516},{"style":1273},[9517],{"type":999,"value":8759},{"type":993,"tag":1027,"props":9519,"children":9520},{"style":1068},[9521],{"type":999,"value":1832},{"type":993,"tag":1027,"props":9523,"children":9524},{"style":1054},[9525],{"type":999,"value":8710},{"type":993,"tag":1027,"props":9527,"children":9528},{"style":1068},[9529],{"type":999,"value":1710},{"type":993,"tag":1027,"props":9531,"children":9532},{"style":1273},[9533],{"type":999,"value":1695},{"type":993,"tag":1027,"props":9535,"children":9536},{"style":1054},[9537],{"type":999,"value":2077},{"type":993,"tag":1027,"props":9539,"children":9540},{"class":1029,"line":411},[9541,9545,9549],{"type":993,"tag":1027,"props":9542,"children":9543},{"style":1054},[9544],{"type":999,"value":8787},{"type":993,"tag":1027,"props":9546,"children":9547},{"style":1068},[9548],{"type":999,"value":3294},{"type":993,"tag":1027,"props":9550,"children":9551},{"style":1054},[9552],{"type":999,"value":2077},{"type":993,"tag":1027,"props":9554,"children":9555},{"class":1029,"line":420},[9556,9560,9564,9568,9572,9576,9580,9584,9588],{"type":993,"tag":1027,"props":9557,"children":9558},{"style":1068},[9559],{"type":999,"value":1309},{"type":993,"tag":1027,"props":9561,"children":9562},{"style":1054},[9563],{"type":999,"value":4027},{"type":993,"tag":1027,"props":9565,"children":9566},{"style":1042},[9567],{"type":999,"value":4150},{"type":993,"tag":1027,"props":9569,"children":9570},{"style":1273},[9571],{"type":999,"value":8815},{"type":993,"tag":1027,"props":9573,"children":9574},{"style":1068},[9575],{"type":999,"value":1832},{"type":993,"tag":1027,"props":9577,"children":9578},{"style":1054},[9579],{"type":999,"value":8710},{"type":993,"tag":1027,"props":9581,"children":9582},{"style":1068},[9583],{"type":999,"value":1710},{"type":993,"tag":1027,"props":9585,"children":9586},{"style":1273},[9587],{"type":999,"value":1695},{"type":993,"tag":1027,"props":9589,"children":9590},{"style":1054},[9591],{"type":999,"value":2077},{"type":993,"tag":1027,"props":9593,"children":9594},{"class":1029,"line":429},[9595,9599,9603],{"type":993,"tag":1027,"props":9596,"children":9597},{"style":1054},[9598],{"type":999,"value":8843},{"type":993,"tag":1027,"props":9600,"children":9601},{"style":1068},[9602],{"type":999,"value":1319},{"type":993,"tag":1027,"props":9604,"children":9605},{"style":1054},[9606],{"type":999,"value":2077},{"type":993,"tag":1027,"props":9608,"children":9609},{"class":1029,"line":438},[9610,9614,9618,9622,9626,9630,9634,9638,9642],{"type":993,"tag":1027,"props":9611,"children":9612},{"style":1068},[9613],{"type":999,"value":1309},{"type":993,"tag":1027,"props":9615,"children":9616},{"style":1054},[9617],{"type":999,"value":4027},{"type":993,"tag":1027,"props":9619,"children":9620},{"style":1042},[9621],{"type":999,"value":4150},{"type":993,"tag":1027,"props":9623,"children":9624},{"style":1273},[9625],{"type":999,"value":8871},{"type":993,"tag":1027,"props":9627,"children":9628},{"style":1068},[9629],{"type":999,"value":1832},{"type":993,"tag":1027,"props":9631,"children":9632},{"style":1054},[9633],{"type":999,"value":8710},{"type":993,"tag":1027,"props":9635,"children":9636},{"style":1068},[9637],{"type":999,"value":1710},{"type":993,"tag":1027,"props":9639,"children":9640},{"style":1273},[9641],{"type":999,"value":1695},{"type":993,"tag":1027,"props":9643,"children":9644},{"style":1054},[9645],{"type":999,"value":2077},{"type":993,"tag":1002,"props":9647,"children":9648},{},[9649],{"type":993,"tag":1405,"props":9650,"children":9651},{},[9652],{"type":999,"value":9653},"Key Learning Points:",{"type":993,"tag":1411,"props":9655,"children":9656},{},[9657,9677,9688,9699,9710],{"type":993,"tag":1415,"props":9658,"children":9659},{},[9660,9662,9667,9669,9675],{"type":999,"value":9661},"📌 ",{"type":993,"tag":1405,"props":9663,"children":9664},{},[9665],{"type":999,"value":9666},"Instance attributes",{"type":999,"value":9668},": Use ",{"type":993,"tag":1023,"props":9670,"children":9672},{"className":9671},[],[9673],{"type":999,"value":9674},"self.result",{"type":999,"value":9676}," to store calculator's current state",{"type":993,"tag":1415,"props":9678,"children":9679},{},[9680,9681,9686],{"type":999,"value":9661},{"type":993,"tag":1405,"props":9682,"children":9683},{},[9684],{"type":999,"value":9685},"Method chaining",{"type":999,"value":9687},": Return values allow methods to be used in sequence",{"type":993,"tag":1415,"props":9689,"children":9690},{},[9691,9692,9697],{"type":999,"value":9661},{"type":993,"tag":1405,"props":9693,"children":9694},{},[9695],{"type":999,"value":9696},"State management",{"type":999,"value":9698},": Object maintains its state between method calls",{"type":993,"tag":1415,"props":9700,"children":9701},{},[9702,9703,9708],{"type":999,"value":9661},{"type":993,"tag":1405,"props":9704,"children":9705},{},[9706],{"type":999,"value":9707},"Error handling",{"type":999,"value":9709},": Check for invalid operations like division by zero",{"type":993,"tag":1415,"props":9711,"children":9712},{},[9713,9714,9719],{"type":999,"value":9661},{"type":993,"tag":1405,"props":9715,"children":9716},{},[9717],{"type":999,"value":9718},"Method organization",{"type":999,"value":9720},": Group related functionality in logical methods",{"type":993,"tag":1002,"props":9722,"children":9723},{},[9724,9726,9732],{"type":999,"value":9725},"Learn more about ",{"type":993,"tag":9727,"props":9728,"children":9729},"a",{"href":699},[9730],{"type":999,"value":9731},"class inheritance",{"type":999,"value":9733}," to discover how to build upon existing classes and create specialized versions.",{"type":993,"tag":1375,"props":9735,"children":9737},{"id":9736},"test-your-knowledge",[9738],{"type":999,"value":9739},"Test Your Knowledge",{"type":993,"tag":1002,"props":9741,"children":9742},{},[9743],{"type":999,"value":9744},"Test what you've learned about object methods:",{"type":993,"tag":9746,"props":9747,"children":9751},"redirect-button",{"icon":9748,"label":9749,"url":9750},"pi pi-send","Take Quiz","/tutorial-quiz/python/object-methods",[],{"type":993,"tag":1375,"props":9753,"children":9755},{"id":9754},"whats-next",[9756],{"type":999,"value":9757},"What's Next?",{"type":993,"tag":1002,"props":9759,"children":9760},{},[9761],{"type":999,"value":9762},"Now that you understand how to create powerful object methods, you're ready to learn about class inheritance. Inheritance allows you to build upon existing classes and create specialized versions without starting from scratch.",{"type":993,"tag":1002,"props":9764,"children":9765},{},[9766,9768,9772],{"type":999,"value":9767},"Ready to continue? Check out our lesson on ",{"type":993,"tag":9727,"props":9769,"children":9770},{"href":699},[9771],{"type":999,"value":700},{"type":999,"value":9773},".",{"type":993,"tag":9775,"props":9776,"children":9777},"style",{},[9778],{"type":999,"value":9779},"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":9781},[9782,9786,9790,9794,9795,9798,9802,9803],{"id":1377,"depth":27,"text":1380,"children":9783},[9784,9785],{"id":1536,"depth":36,"text":1539},{"id":2176,"depth":36,"text":2179},{"id":2705,"depth":27,"text":2708,"children":9787},[9788,9789],{"id":2716,"depth":36,"text":2719},{"id":3369,"depth":36,"text":3372},{"id":4240,"depth":27,"text":4243,"children":9791},[9792,9793],{"id":4467,"depth":36,"text":4470},{"id":4980,"depth":36,"text":4983},{"id":5945,"depth":27,"text":5948},{"id":6121,"depth":27,"text":6124,"children":9796},[9797],{"id":6132,"depth":36,"text":6135},{"id":7115,"depth":27,"text":7118,"children":9799},[9800,9801],{"id":7121,"depth":36,"text":7124},{"id":8894,"depth":36,"text":8897},{"id":9736,"depth":27,"text":9739},{"id":9754,"depth":27,"text":9757},1782373747002]