[{"data":1,"prerenderedAt":4534},["ShallowReactive",2],{"tutorials-python":3,"category-items-python":987,"content-/python/if-statements":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},"/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},"/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},"/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},"/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},"/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},"/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},"/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",[196],{"_path":197,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":198,"description":199,"slug":200,"parentId":187,"order":201,"body":989,"_type":15,"_id":202,"_source":17,"_file":203,"_stem":204,"_extension":20},{"type":990,"children":991,"toc":4520},"root",[992,1000,1006,1011,1165,1172,1184,1304,1330,1535,1541,1546,1678,1683,1993,1998,2004,2009,2079,2086,2275,2281,2286,2399,2404,2673,2679,2684,2921,2936,3447,3453,3458,3615,4115,4121,4126,4258,4264,4397,4402,4408,4413,4420,4426,4440,4481,4514],{"type":993,"tag":994,"props":995,"children":996},"element","h1",{"id":200},[997],{"type":998,"value":999},"text","🎯 If Statements",{"type":993,"tag":1001,"props":1002,"children":1003},"p",{},[1004],{"type":998,"value":1005},"If statements are the foundation of decision making in Python. They allow your programs to execute different code based on whether conditions are true or false. Think of if statements as asking questions in your code - \"if this condition is true, then do this action.\"",{"type":993,"tag":1001,"props":1007,"children":1008},{},[1009],{"type":998,"value":1010},"Every if statement evaluates a condition and executes a block of code only when that condition is true. This simple concept enables your programs to respond intelligently to different situations and data.",{"type":993,"tag":1012,"props":1013,"children":1014},"code-try",{},[1015],{"type":993,"tag":1016,"props":1017,"children":1020},"pre",{"className":1018,"code":1019,"language":6,"meta":8,"style":8},"language-python shiki shiki-themes github-light github-dark","# Basic if statement\nage = 18\n\nif age >= 18:\n    print(\"You are an adult!\")\n    print(\"You can vote!\")\n\nprint(\"This line always runs\")\n",[1021],{"type":993,"tag":1022,"props":1023,"children":1024},"code",{"__ignoreMap":8},[1025,1036,1057,1065,1093,1117,1137,1144],{"type":993,"tag":1026,"props":1027,"children":1029},"span",{"class":1028,"line":12},"line",[1030],{"type":993,"tag":1026,"props":1031,"children":1033},{"style":1032},"--shiki-default:#6A737D;--shiki-app-dark-mode:#6A737D",[1034],{"type":998,"value":1035},"# Basic if statement\n",{"type":993,"tag":1026,"props":1037,"children":1038},{"class":1028,"line":27},[1039,1045,1051],{"type":993,"tag":1026,"props":1040,"children":1042},{"style":1041},"--shiki-default:#24292E;--shiki-app-dark-mode:#E1E4E8",[1043],{"type":998,"value":1044},"age ",{"type":993,"tag":1026,"props":1046,"children":1048},{"style":1047},"--shiki-default:#D73A49;--shiki-app-dark-mode:#F97583",[1049],{"type":998,"value":1050},"=",{"type":993,"tag":1026,"props":1052,"children":1054},{"style":1053},"--shiki-default:#005CC5;--shiki-app-dark-mode:#79B8FF",[1055],{"type":998,"value":1056}," 18\n",{"type":993,"tag":1026,"props":1058,"children":1059},{"class":1028,"line":36},[1060],{"type":993,"tag":1026,"props":1061,"children":1062},{"emptyLinePlaceholder":13},[1063],{"type":998,"value":1064},"\n",{"type":993,"tag":1026,"props":1066,"children":1067},{"class":1028,"line":45},[1068,1073,1078,1083,1088],{"type":993,"tag":1026,"props":1069,"children":1070},{"style":1047},[1071],{"type":998,"value":1072},"if",{"type":993,"tag":1026,"props":1074,"children":1075},{"style":1041},[1076],{"type":998,"value":1077}," age ",{"type":993,"tag":1026,"props":1079,"children":1080},{"style":1047},[1081],{"type":998,"value":1082},">=",{"type":993,"tag":1026,"props":1084,"children":1085},{"style":1053},[1086],{"type":998,"value":1087}," 18",{"type":993,"tag":1026,"props":1089,"children":1090},{"style":1041},[1091],{"type":998,"value":1092},":\n",{"type":993,"tag":1026,"props":1094,"children":1095},{"class":1028,"line":54},[1096,1101,1106,1112],{"type":993,"tag":1026,"props":1097,"children":1098},{"style":1053},[1099],{"type":998,"value":1100},"    print",{"type":993,"tag":1026,"props":1102,"children":1103},{"style":1041},[1104],{"type":998,"value":1105},"(",{"type":993,"tag":1026,"props":1107,"children":1109},{"style":1108},"--shiki-default:#032F62;--shiki-app-dark-mode:#9ECBFF",[1110],{"type":998,"value":1111},"\"You are an adult!\"",{"type":993,"tag":1026,"props":1113,"children":1114},{"style":1041},[1115],{"type":998,"value":1116},")\n",{"type":993,"tag":1026,"props":1118,"children":1119},{"class":1028,"line":63},[1120,1124,1128,1133],{"type":993,"tag":1026,"props":1121,"children":1122},{"style":1053},[1123],{"type":998,"value":1100},{"type":993,"tag":1026,"props":1125,"children":1126},{"style":1041},[1127],{"type":998,"value":1105},{"type":993,"tag":1026,"props":1129,"children":1130},{"style":1108},[1131],{"type":998,"value":1132},"\"You can vote!\"",{"type":993,"tag":1026,"props":1134,"children":1135},{"style":1041},[1136],{"type":998,"value":1116},{"type":993,"tag":1026,"props":1138,"children":1139},{"class":1028,"line":72},[1140],{"type":993,"tag":1026,"props":1141,"children":1142},{"emptyLinePlaceholder":13},[1143],{"type":998,"value":1064},{"type":993,"tag":1026,"props":1145,"children":1146},{"class":1028,"line":81},[1147,1152,1156,1161],{"type":993,"tag":1026,"props":1148,"children":1149},{"style":1053},[1150],{"type":998,"value":1151},"print",{"type":993,"tag":1026,"props":1153,"children":1154},{"style":1041},[1155],{"type":998,"value":1105},{"type":993,"tag":1026,"props":1157,"children":1158},{"style":1108},[1159],{"type":998,"value":1160},"\"This line always runs\"",{"type":993,"tag":1026,"props":1162,"children":1163},{"style":1041},[1164],{"type":998,"value":1116},{"type":993,"tag":1166,"props":1167,"children":1169},"h2",{"id":1168},"basic-if-statement-syntax",[1170],{"type":998,"value":1171},"📝 Basic If Statement Syntax",{"type":993,"tag":1001,"props":1173,"children":1174},{},[1175,1177,1182],{"type":998,"value":1176},"The if statement follows a simple pattern: the keyword ",{"type":993,"tag":1022,"props":1178,"children":1180},{"className":1179},[],[1181],{"type":998,"value":1072},{"type":998,"value":1183},", followed by a condition, then a colon, and finally an indented block of code. Python uses indentation to determine which code belongs to the if statement.",{"type":993,"tag":1185,"props":1186,"children":1190},"info-box",{"emoji":1187,"title":1188,"type":1189},"📝","If Statement Syntax Rules","info",[1191,1200,1243,1251,1284,1294],{"type":993,"tag":1001,"props":1192,"children":1193},{},[1194],{"type":993,"tag":1195,"props":1196,"children":1197},"strong",{},[1198],{"type":998,"value":1199},"Required Components:",{"type":993,"tag":1201,"props":1202,"children":1203},"ul",{},[1204,1215,1225,1238],{"type":993,"tag":1205,"props":1206,"children":1207},"li",{},[1208,1213],{"type":993,"tag":1022,"props":1209,"children":1211},{"className":1210},[],[1212],{"type":998,"value":1072},{"type":998,"value":1214}," keyword to start the statement",{"type":993,"tag":1205,"props":1216,"children":1217},{},[1218,1220],{"type":998,"value":1219},"Boolean condition that evaluates to ",{"type":993,"tag":1195,"props":1221,"children":1222},{},[1223],{"type":998,"value":1224},"True/False",{"type":993,"tag":1205,"props":1226,"children":1227},{},[1228,1230,1236],{"type":998,"value":1229},"Colon ",{"type":993,"tag":1022,"props":1231,"children":1233},{"className":1232},[],[1234],{"type":998,"value":1235},":",{"type":998,"value":1237}," after the condition",{"type":993,"tag":1205,"props":1239,"children":1240},{},[1241],{"type":998,"value":1242},"Indented code block (usually 4 spaces)",{"type":993,"tag":1001,"props":1244,"children":1245},{},[1246],{"type":993,"tag":1195,"props":1247,"children":1248},{},[1249],{"type":998,"value":1250},"Execution Logic:",{"type":993,"tag":1201,"props":1252,"children":1253},{},[1254,1264,1274],{"type":993,"tag":1205,"props":1255,"children":1256},{},[1257,1262],{"type":993,"tag":1195,"props":1258,"children":1259},{},[1260],{"type":998,"value":1261},"Condition True",{"type":998,"value":1263},": Execute indented code block",{"type":993,"tag":1205,"props":1265,"children":1266},{},[1267,1272],{"type":993,"tag":1195,"props":1268,"children":1269},{},[1270],{"type":998,"value":1271},"Condition False",{"type":998,"value":1273},": Skip indented code block",{"type":993,"tag":1205,"props":1275,"children":1276},{},[1277,1282],{"type":993,"tag":1195,"props":1278,"children":1279},{},[1280],{"type":998,"value":1281},"Continue",{"type":998,"value":1283},": with unindented code after the block",{"type":993,"tag":1001,"props":1285,"children":1286},{},[1287,1292],{"type":993,"tag":1195,"props":1288,"children":1289},{},[1290],{"type":998,"value":1291},"Indentation Importance:",{"type":998,"value":1293}," Python uses whitespace to define code blocks",{"type":993,"tag":1001,"props":1295,"children":1296},{},[1297,1302],{"type":993,"tag":1195,"props":1298,"children":1299},{},[1300],{"type":998,"value":1301},"Best Practice:",{"type":998,"value":1303}," Use 4 spaces for indentation consistency",{"type":993,"tag":1001,"props":1305,"children":1306},{},[1307,1309,1318,1320,1328],{"type":998,"value":1308},"The condition must be an expression that evaluates to True or False using ",{"type":993,"tag":1195,"props":1310,"children":1311},{},[1312],{"type":993,"tag":1313,"props":1314,"children":1315},"a",{"href":151},[1316],{"type":998,"value":1317},"comparison operators",{"type":998,"value":1319}," or ",{"type":993,"tag":1195,"props":1321,"children":1322},{},[1323],{"type":993,"tag":1313,"props":1324,"children":1325},{"href":114},[1326],{"type":998,"value":1327},"truthiness rules",{"type":998,"value":1329},". When the condition is true, Python executes all the indented code under the if statement. When false, Python skips that code entirely.",{"type":993,"tag":1012,"props":1331,"children":1332},{},[1333],{"type":993,"tag":1016,"props":1334,"children":1336},{"className":1018,"code":1335,"language":6,"meta":8,"style":8},"# If statement with different conditions\ntemperature = 75\nis_sunny = True\nhas_umbrella = False\n\nif temperature > 70:\n    print(\"It's warm outside!\")\n\nif is_sunny:\n    print(\"The sun is shining!\")\n\nif not has_umbrella:\n    print(\"Don't forget your umbrella if it rains!\")\n",[1337],{"type":993,"tag":1022,"props":1338,"children":1339},{"__ignoreMap":8},[1340,1348,1365,1382,1399,1406,1432,1452,1459,1471,1491,1498,1515],{"type":993,"tag":1026,"props":1341,"children":1342},{"class":1028,"line":12},[1343],{"type":993,"tag":1026,"props":1344,"children":1345},{"style":1032},[1346],{"type":998,"value":1347},"# If statement with different conditions\n",{"type":993,"tag":1026,"props":1349,"children":1350},{"class":1028,"line":27},[1351,1356,1360],{"type":993,"tag":1026,"props":1352,"children":1353},{"style":1041},[1354],{"type":998,"value":1355},"temperature ",{"type":993,"tag":1026,"props":1357,"children":1358},{"style":1047},[1359],{"type":998,"value":1050},{"type":993,"tag":1026,"props":1361,"children":1362},{"style":1053},[1363],{"type":998,"value":1364}," 75\n",{"type":993,"tag":1026,"props":1366,"children":1367},{"class":1028,"line":36},[1368,1373,1377],{"type":993,"tag":1026,"props":1369,"children":1370},{"style":1041},[1371],{"type":998,"value":1372},"is_sunny ",{"type":993,"tag":1026,"props":1374,"children":1375},{"style":1047},[1376],{"type":998,"value":1050},{"type":993,"tag":1026,"props":1378,"children":1379},{"style":1053},[1380],{"type":998,"value":1381}," True\n",{"type":993,"tag":1026,"props":1383,"children":1384},{"class":1028,"line":45},[1385,1390,1394],{"type":993,"tag":1026,"props":1386,"children":1387},{"style":1041},[1388],{"type":998,"value":1389},"has_umbrella ",{"type":993,"tag":1026,"props":1391,"children":1392},{"style":1047},[1393],{"type":998,"value":1050},{"type":993,"tag":1026,"props":1395,"children":1396},{"style":1053},[1397],{"type":998,"value":1398}," False\n",{"type":993,"tag":1026,"props":1400,"children":1401},{"class":1028,"line":54},[1402],{"type":993,"tag":1026,"props":1403,"children":1404},{"emptyLinePlaceholder":13},[1405],{"type":998,"value":1064},{"type":993,"tag":1026,"props":1407,"children":1408},{"class":1028,"line":63},[1409,1413,1418,1423,1428],{"type":993,"tag":1026,"props":1410,"children":1411},{"style":1047},[1412],{"type":998,"value":1072},{"type":993,"tag":1026,"props":1414,"children":1415},{"style":1041},[1416],{"type":998,"value":1417}," temperature ",{"type":993,"tag":1026,"props":1419,"children":1420},{"style":1047},[1421],{"type":998,"value":1422},">",{"type":993,"tag":1026,"props":1424,"children":1425},{"style":1053},[1426],{"type":998,"value":1427}," 70",{"type":993,"tag":1026,"props":1429,"children":1430},{"style":1041},[1431],{"type":998,"value":1092},{"type":993,"tag":1026,"props":1433,"children":1434},{"class":1028,"line":72},[1435,1439,1443,1448],{"type":993,"tag":1026,"props":1436,"children":1437},{"style":1053},[1438],{"type":998,"value":1100},{"type":993,"tag":1026,"props":1440,"children":1441},{"style":1041},[1442],{"type":998,"value":1105},{"type":993,"tag":1026,"props":1444,"children":1445},{"style":1108},[1446],{"type":998,"value":1447},"\"It's warm outside!\"",{"type":993,"tag":1026,"props":1449,"children":1450},{"style":1041},[1451],{"type":998,"value":1116},{"type":993,"tag":1026,"props":1453,"children":1454},{"class":1028,"line":81},[1455],{"type":993,"tag":1026,"props":1456,"children":1457},{"emptyLinePlaceholder":13},[1458],{"type":998,"value":1064},{"type":993,"tag":1026,"props":1460,"children":1461},{"class":1028,"line":91},[1462,1466],{"type":993,"tag":1026,"props":1463,"children":1464},{"style":1047},[1465],{"type":998,"value":1072},{"type":993,"tag":1026,"props":1467,"children":1468},{"style":1041},[1469],{"type":998,"value":1470}," is_sunny:\n",{"type":993,"tag":1026,"props":1472,"children":1473},{"class":1028,"line":100},[1474,1478,1482,1487],{"type":993,"tag":1026,"props":1475,"children":1476},{"style":1053},[1477],{"type":998,"value":1100},{"type":993,"tag":1026,"props":1479,"children":1480},{"style":1041},[1481],{"type":998,"value":1105},{"type":993,"tag":1026,"props":1483,"children":1484},{"style":1108},[1485],{"type":998,"value":1486},"\"The sun is shining!\"",{"type":993,"tag":1026,"props":1488,"children":1489},{"style":1041},[1490],{"type":998,"value":1116},{"type":993,"tag":1026,"props":1492,"children":1493},{"class":1028,"line":109},[1494],{"type":993,"tag":1026,"props":1495,"children":1496},{"emptyLinePlaceholder":13},[1497],{"type":998,"value":1064},{"type":993,"tag":1026,"props":1499,"children":1500},{"class":1028,"line":118},[1501,1505,1510],{"type":993,"tag":1026,"props":1502,"children":1503},{"style":1047},[1504],{"type":998,"value":1072},{"type":993,"tag":1026,"props":1506,"children":1507},{"style":1047},[1508],{"type":998,"value":1509}," not",{"type":993,"tag":1026,"props":1511,"children":1512},{"style":1041},[1513],{"type":998,"value":1514}," has_umbrella:\n",{"type":993,"tag":1026,"props":1516,"children":1517},{"class":1028,"line":127},[1518,1522,1526,1531],{"type":993,"tag":1026,"props":1519,"children":1520},{"style":1053},[1521],{"type":998,"value":1100},{"type":993,"tag":1026,"props":1523,"children":1524},{"style":1041},[1525],{"type":998,"value":1105},{"type":993,"tag":1026,"props":1527,"children":1528},{"style":1108},[1529],{"type":998,"value":1530},"\"Don't forget your umbrella if it rains!\"",{"type":993,"tag":1026,"props":1532,"children":1533},{"style":1041},[1534],{"type":998,"value":1116},{"type":993,"tag":1166,"props":1536,"children":1538},{"id":1537},"️-if-else-statements",[1539],{"type":998,"value":1540},"⚖️ If-Else Statements",{"type":993,"tag":1001,"props":1542,"children":1543},{},[1544],{"type":998,"value":1545},"The if-else statement provides an alternative path when the condition is false. This creates a clear choice between two different actions, ensuring your program always does something meaningful.",{"type":993,"tag":1185,"props":1547,"children":1551},{"emoji":1548,"title":1549,"type":1550},"⚖️","If-Else Statement Benefits","success",[1552,1560,1597,1605,1658,1668],{"type":993,"tag":1001,"props":1553,"children":1554},{},[1555],{"type":993,"tag":1195,"props":1556,"children":1557},{},[1558],{"type":998,"value":1559},"Binary Decision Making:",{"type":993,"tag":1201,"props":1561,"children":1562},{},[1563,1582,1587,1592],{"type":993,"tag":1205,"props":1564,"children":1565},{},[1566,1568,1573,1575,1580],{"type":998,"value":1567},"Handles both ",{"type":993,"tag":1195,"props":1569,"children":1570},{},[1571],{"type":998,"value":1572},"True",{"type":998,"value":1574}," and ",{"type":993,"tag":1195,"props":1576,"children":1577},{},[1578],{"type":998,"value":1579},"False",{"type":998,"value":1581}," conditions",{"type":993,"tag":1205,"props":1583,"children":1584},{},[1585],{"type":998,"value":1586},"Ensures program always takes an action",{"type":993,"tag":1205,"props":1588,"children":1589},{},[1590],{"type":998,"value":1591},"Provides clear alternative paths",{"type":993,"tag":1205,"props":1593,"children":1594},{},[1595],{"type":998,"value":1596},"Eliminates unhandled condition scenarios",{"type":993,"tag":1001,"props":1598,"children":1599},{},[1600],{"type":993,"tag":1195,"props":1601,"children":1602},{},[1603],{"type":998,"value":1604},"Structure:",{"type":993,"tag":1201,"props":1606,"children":1607},{},[1608,1623,1638,1648],{"type":993,"tag":1205,"props":1609,"children":1610},{},[1611,1621],{"type":993,"tag":1195,"props":1612,"children":1613},{},[1614,1619],{"type":993,"tag":1022,"props":1615,"children":1617},{"className":1616},[],[1618],{"type":998,"value":1072},{"type":998,"value":1620}," block",{"type":998,"value":1622},": Executes when condition is True",{"type":993,"tag":1205,"props":1624,"children":1625},{},[1626,1636],{"type":993,"tag":1195,"props":1627,"children":1628},{},[1629,1635],{"type":993,"tag":1022,"props":1630,"children":1632},{"className":1631},[],[1633],{"type":998,"value":1634},"else",{"type":998,"value":1620},{"type":998,"value":1637},": Executes when condition is False",{"type":993,"tag":1205,"props":1639,"children":1640},{},[1641,1646],{"type":993,"tag":1195,"props":1642,"children":1643},{},[1644],{"type":998,"value":1645},"Exactly one block",{"type":998,"value":1647}," always executes",{"type":993,"tag":1205,"props":1649,"children":1650},{},[1651,1656],{"type":993,"tag":1195,"props":1652,"children":1653},{},[1654],{"type":998,"value":1655},"No condition",{"type":998,"value":1657}," needed for else clause",{"type":993,"tag":1001,"props":1659,"children":1660},{},[1661,1666],{"type":993,"tag":1195,"props":1662,"children":1663},{},[1664],{"type":998,"value":1665},"Use Cases:",{"type":998,"value":1667}," Pass/fail scenarios, on/off states, yes/no decisions",{"type":993,"tag":1001,"props":1669,"children":1670},{},[1671,1676],{"type":993,"tag":1195,"props":1672,"children":1673},{},[1674],{"type":998,"value":1675},"Guarantee:",{"type":998,"value":1677}," One of the two code paths will always execute",{"type":993,"tag":1001,"props":1679,"children":1680},{},[1681],{"type":998,"value":1682},"The else clause executes only when the if condition is false. This pattern is perfect for binary decisions where you need to handle both possibilities.",{"type":993,"tag":1012,"props":1684,"children":1685},{},[1686],{"type":993,"tag":1016,"props":1687,"children":1689},{"className":1018,"code":1688,"language":6,"meta":8,"style":8},"# If-else statement\nscore = 75\n\nif score >= 70:\n    print(\"Congratulations! You passed!\")\n    result = \"Pass\"\nelse:\n    print(\"Sorry, you need to study more.\")\n    result = \"Fail\"\n\nprint(f\"Your result: {result}\")\n\n# Another example\nweather = \"rainy\"\nif weather == \"sunny\":\n    print(\"Let's go to the beach!\")\nelse:\n    print(\"Let's stay inside and read.\")\n",[1690],{"type":993,"tag":1022,"props":1691,"children":1692},{"__ignoreMap":8},[1693,1701,1717,1724,1748,1768,1785,1796,1816,1832,1839,1884,1891,1899,1916,1942,1962,1973],{"type":993,"tag":1026,"props":1694,"children":1695},{"class":1028,"line":12},[1696],{"type":993,"tag":1026,"props":1697,"children":1698},{"style":1032},[1699],{"type":998,"value":1700},"# If-else statement\n",{"type":993,"tag":1026,"props":1702,"children":1703},{"class":1028,"line":27},[1704,1709,1713],{"type":993,"tag":1026,"props":1705,"children":1706},{"style":1041},[1707],{"type":998,"value":1708},"score ",{"type":993,"tag":1026,"props":1710,"children":1711},{"style":1047},[1712],{"type":998,"value":1050},{"type":993,"tag":1026,"props":1714,"children":1715},{"style":1053},[1716],{"type":998,"value":1364},{"type":993,"tag":1026,"props":1718,"children":1719},{"class":1028,"line":36},[1720],{"type":993,"tag":1026,"props":1721,"children":1722},{"emptyLinePlaceholder":13},[1723],{"type":998,"value":1064},{"type":993,"tag":1026,"props":1725,"children":1726},{"class":1028,"line":45},[1727,1731,1736,1740,1744],{"type":993,"tag":1026,"props":1728,"children":1729},{"style":1047},[1730],{"type":998,"value":1072},{"type":993,"tag":1026,"props":1732,"children":1733},{"style":1041},[1734],{"type":998,"value":1735}," score ",{"type":993,"tag":1026,"props":1737,"children":1738},{"style":1047},[1739],{"type":998,"value":1082},{"type":993,"tag":1026,"props":1741,"children":1742},{"style":1053},[1743],{"type":998,"value":1427},{"type":993,"tag":1026,"props":1745,"children":1746},{"style":1041},[1747],{"type":998,"value":1092},{"type":993,"tag":1026,"props":1749,"children":1750},{"class":1028,"line":54},[1751,1755,1759,1764],{"type":993,"tag":1026,"props":1752,"children":1753},{"style":1053},[1754],{"type":998,"value":1100},{"type":993,"tag":1026,"props":1756,"children":1757},{"style":1041},[1758],{"type":998,"value":1105},{"type":993,"tag":1026,"props":1760,"children":1761},{"style":1108},[1762],{"type":998,"value":1763},"\"Congratulations! You passed!\"",{"type":993,"tag":1026,"props":1765,"children":1766},{"style":1041},[1767],{"type":998,"value":1116},{"type":993,"tag":1026,"props":1769,"children":1770},{"class":1028,"line":63},[1771,1776,1780],{"type":993,"tag":1026,"props":1772,"children":1773},{"style":1041},[1774],{"type":998,"value":1775},"    result ",{"type":993,"tag":1026,"props":1777,"children":1778},{"style":1047},[1779],{"type":998,"value":1050},{"type":993,"tag":1026,"props":1781,"children":1782},{"style":1108},[1783],{"type":998,"value":1784}," \"Pass\"\n",{"type":993,"tag":1026,"props":1786,"children":1787},{"class":1028,"line":72},[1788,1792],{"type":993,"tag":1026,"props":1789,"children":1790},{"style":1047},[1791],{"type":998,"value":1634},{"type":993,"tag":1026,"props":1793,"children":1794},{"style":1041},[1795],{"type":998,"value":1092},{"type":993,"tag":1026,"props":1797,"children":1798},{"class":1028,"line":81},[1799,1803,1807,1812],{"type":993,"tag":1026,"props":1800,"children":1801},{"style":1053},[1802],{"type":998,"value":1100},{"type":993,"tag":1026,"props":1804,"children":1805},{"style":1041},[1806],{"type":998,"value":1105},{"type":993,"tag":1026,"props":1808,"children":1809},{"style":1108},[1810],{"type":998,"value":1811},"\"Sorry, you need to study more.\"",{"type":993,"tag":1026,"props":1813,"children":1814},{"style":1041},[1815],{"type":998,"value":1116},{"type":993,"tag":1026,"props":1817,"children":1818},{"class":1028,"line":91},[1819,1823,1827],{"type":993,"tag":1026,"props":1820,"children":1821},{"style":1041},[1822],{"type":998,"value":1775},{"type":993,"tag":1026,"props":1824,"children":1825},{"style":1047},[1826],{"type":998,"value":1050},{"type":993,"tag":1026,"props":1828,"children":1829},{"style":1108},[1830],{"type":998,"value":1831}," \"Fail\"\n",{"type":993,"tag":1026,"props":1833,"children":1834},{"class":1028,"line":100},[1835],{"type":993,"tag":1026,"props":1836,"children":1837},{"emptyLinePlaceholder":13},[1838],{"type":998,"value":1064},{"type":993,"tag":1026,"props":1840,"children":1841},{"class":1028,"line":109},[1842,1846,1850,1855,1860,1865,1870,1875,1880],{"type":993,"tag":1026,"props":1843,"children":1844},{"style":1053},[1845],{"type":998,"value":1151},{"type":993,"tag":1026,"props":1847,"children":1848},{"style":1041},[1849],{"type":998,"value":1105},{"type":993,"tag":1026,"props":1851,"children":1852},{"style":1047},[1853],{"type":998,"value":1854},"f",{"type":993,"tag":1026,"props":1856,"children":1857},{"style":1108},[1858],{"type":998,"value":1859},"\"Your result: ",{"type":993,"tag":1026,"props":1861,"children":1862},{"style":1053},[1863],{"type":998,"value":1864},"{",{"type":993,"tag":1026,"props":1866,"children":1867},{"style":1041},[1868],{"type":998,"value":1869},"result",{"type":993,"tag":1026,"props":1871,"children":1872},{"style":1053},[1873],{"type":998,"value":1874},"}",{"type":993,"tag":1026,"props":1876,"children":1877},{"style":1108},[1878],{"type":998,"value":1879},"\"",{"type":993,"tag":1026,"props":1881,"children":1882},{"style":1041},[1883],{"type":998,"value":1116},{"type":993,"tag":1026,"props":1885,"children":1886},{"class":1028,"line":118},[1887],{"type":993,"tag":1026,"props":1888,"children":1889},{"emptyLinePlaceholder":13},[1890],{"type":998,"value":1064},{"type":993,"tag":1026,"props":1892,"children":1893},{"class":1028,"line":127},[1894],{"type":993,"tag":1026,"props":1895,"children":1896},{"style":1032},[1897],{"type":998,"value":1898},"# Another example\n",{"type":993,"tag":1026,"props":1900,"children":1901},{"class":1028,"line":136},[1902,1907,1911],{"type":993,"tag":1026,"props":1903,"children":1904},{"style":1041},[1905],{"type":998,"value":1906},"weather ",{"type":993,"tag":1026,"props":1908,"children":1909},{"style":1047},[1910],{"type":998,"value":1050},{"type":993,"tag":1026,"props":1912,"children":1913},{"style":1108},[1914],{"type":998,"value":1915}," \"rainy\"\n",{"type":993,"tag":1026,"props":1917,"children":1918},{"class":1028,"line":146},[1919,1923,1928,1933,1938],{"type":993,"tag":1026,"props":1920,"children":1921},{"style":1047},[1922],{"type":998,"value":1072},{"type":993,"tag":1026,"props":1924,"children":1925},{"style":1041},[1926],{"type":998,"value":1927}," weather ",{"type":993,"tag":1026,"props":1929,"children":1930},{"style":1047},[1931],{"type":998,"value":1932},"==",{"type":993,"tag":1026,"props":1934,"children":1935},{"style":1108},[1936],{"type":998,"value":1937}," \"sunny\"",{"type":993,"tag":1026,"props":1939,"children":1940},{"style":1041},[1941],{"type":998,"value":1092},{"type":993,"tag":1026,"props":1943,"children":1944},{"class":1028,"line":155},[1945,1949,1953,1958],{"type":993,"tag":1026,"props":1946,"children":1947},{"style":1053},[1948],{"type":998,"value":1100},{"type":993,"tag":1026,"props":1950,"children":1951},{"style":1041},[1952],{"type":998,"value":1105},{"type":993,"tag":1026,"props":1954,"children":1955},{"style":1108},[1956],{"type":998,"value":1957},"\"Let's go to the beach!\"",{"type":993,"tag":1026,"props":1959,"children":1960},{"style":1041},[1961],{"type":998,"value":1116},{"type":993,"tag":1026,"props":1963,"children":1964},{"class":1028,"line":164},[1965,1969],{"type":993,"tag":1026,"props":1966,"children":1967},{"style":1047},[1968],{"type":998,"value":1634},{"type":993,"tag":1026,"props":1970,"children":1971},{"style":1041},[1972],{"type":998,"value":1092},{"type":993,"tag":1026,"props":1974,"children":1975},{"class":1028,"line":173},[1976,1980,1984,1989],{"type":993,"tag":1026,"props":1977,"children":1978},{"style":1053},[1979],{"type":998,"value":1100},{"type":993,"tag":1026,"props":1981,"children":1982},{"style":1041},[1983],{"type":998,"value":1105},{"type":993,"tag":1026,"props":1985,"children":1986},{"style":1108},[1987],{"type":998,"value":1988},"\"Let's stay inside and read.\"",{"type":993,"tag":1026,"props":1990,"children":1991},{"style":1041},[1992],{"type":998,"value":1116},{"type":993,"tag":1994,"props":1995,"children":1997},"content-exercise",{":widget-view":1996,"category":6,"id":200},"true",[],{"type":993,"tag":1166,"props":1999,"children":2001},{"id":2000},"quick-if-statement-practice",[2002],{"type":998,"value":2003},"🎯 Quick If Statement Practice",{"type":993,"tag":1001,"props":2005,"children":2006},{},[2007],{"type":998,"value":2008},"Let's practice writing simple if-else statements to make decisions!",{"type":993,"tag":2010,"props":2011,"children":2014},"exercise",{"hint":2012,"prompt":2013},"Use if to check conditions, and else to handle when the condition is False!","Practice using if and else statements to check conditions and make decisions.",[2015],{"type":993,"tag":1016,"props":2016,"children":2018},{"className":1018,"code":2017,"language":6,"meta":8,"style":8},"# If Statement Practice - Simple decisions!\n\n# Check test score\nscore = 85\n# TODO: Your code here: if score >= 70, print \"You passed!\", else print \"You failed.\"\n",[2019],{"type":993,"tag":1022,"props":2020,"children":2021},{"__ignoreMap":8},[2022,2030,2037,2045,2061],{"type":993,"tag":1026,"props":2023,"children":2024},{"class":1028,"line":12},[2025],{"type":993,"tag":1026,"props":2026,"children":2027},{"style":1032},[2028],{"type":998,"value":2029},"# If Statement Practice - Simple decisions!\n",{"type":993,"tag":1026,"props":2031,"children":2032},{"class":1028,"line":27},[2033],{"type":993,"tag":1026,"props":2034,"children":2035},{"emptyLinePlaceholder":13},[2036],{"type":998,"value":1064},{"type":993,"tag":1026,"props":2038,"children":2039},{"class":1028,"line":36},[2040],{"type":993,"tag":1026,"props":2041,"children":2042},{"style":1032},[2043],{"type":998,"value":2044},"# Check test score\n",{"type":993,"tag":1026,"props":2046,"children":2047},{"class":1028,"line":45},[2048,2052,2056],{"type":993,"tag":1026,"props":2049,"children":2050},{"style":1041},[2051],{"type":998,"value":1708},{"type":993,"tag":1026,"props":2053,"children":2054},{"style":1047},[2055],{"type":998,"value":1050},{"type":993,"tag":1026,"props":2057,"children":2058},{"style":1053},[2059],{"type":998,"value":2060}," 85\n",{"type":993,"tag":1026,"props":2062,"children":2063},{"class":1028,"line":54},[2064,2069,2074],{"type":993,"tag":1026,"props":2065,"children":2066},{"style":1032},[2067],{"type":998,"value":2068},"# ",{"type":993,"tag":1026,"props":2070,"children":2071},{"style":1047},[2072],{"type":998,"value":2073},"TODO",{"type":993,"tag":1026,"props":2075,"children":2076},{"style":1032},[2077],{"type":998,"value":2078},": Your code here: if score >= 70, print \"You passed!\", else print \"You failed.\"\n",{"type":993,"tag":2080,"props":2081,"children":2083},"h3",{"id":2082},"solution-and-explanation",[2084],{"type":998,"value":2085},"Solution and Explanation 💡",{"type":993,"tag":2087,"props":2088,"children":2089},"details",{},[2090,2098,2219,2227],{"type":993,"tag":2091,"props":2092,"children":2095},"summary",{"className":2093},[2094],"cursor-pointer",[2096],{"type":998,"value":2097},"Click to see the complete solution",{"type":993,"tag":1012,"props":2099,"children":2100},{},[2101],{"type":993,"tag":1016,"props":2102,"children":2104},{"className":1018,"code":2103,"language":6,"meta":8,"style":8},"# If Statement Practice - Simple solution\n\n# Check test score\nscore = 85\nif score >= 70:\n    print(\"You passed!\")\nelse:\n    print(\"You failed.\")\n",[2105],{"type":993,"tag":1022,"props":2106,"children":2107},{"__ignoreMap":8},[2108,2116,2123,2130,2145,2168,2188,2199],{"type":993,"tag":1026,"props":2109,"children":2110},{"class":1028,"line":12},[2111],{"type":993,"tag":1026,"props":2112,"children":2113},{"style":1032},[2114],{"type":998,"value":2115},"# If Statement Practice - Simple solution\n",{"type":993,"tag":1026,"props":2117,"children":2118},{"class":1028,"line":27},[2119],{"type":993,"tag":1026,"props":2120,"children":2121},{"emptyLinePlaceholder":13},[2122],{"type":998,"value":1064},{"type":993,"tag":1026,"props":2124,"children":2125},{"class":1028,"line":36},[2126],{"type":993,"tag":1026,"props":2127,"children":2128},{"style":1032},[2129],{"type":998,"value":2044},{"type":993,"tag":1026,"props":2131,"children":2132},{"class":1028,"line":45},[2133,2137,2141],{"type":993,"tag":1026,"props":2134,"children":2135},{"style":1041},[2136],{"type":998,"value":1708},{"type":993,"tag":1026,"props":2138,"children":2139},{"style":1047},[2140],{"type":998,"value":1050},{"type":993,"tag":1026,"props":2142,"children":2143},{"style":1053},[2144],{"type":998,"value":2060},{"type":993,"tag":1026,"props":2146,"children":2147},{"class":1028,"line":54},[2148,2152,2156,2160,2164],{"type":993,"tag":1026,"props":2149,"children":2150},{"style":1047},[2151],{"type":998,"value":1072},{"type":993,"tag":1026,"props":2153,"children":2154},{"style":1041},[2155],{"type":998,"value":1735},{"type":993,"tag":1026,"props":2157,"children":2158},{"style":1047},[2159],{"type":998,"value":1082},{"type":993,"tag":1026,"props":2161,"children":2162},{"style":1053},[2163],{"type":998,"value":1427},{"type":993,"tag":1026,"props":2165,"children":2166},{"style":1041},[2167],{"type":998,"value":1092},{"type":993,"tag":1026,"props":2169,"children":2170},{"class":1028,"line":63},[2171,2175,2179,2184],{"type":993,"tag":1026,"props":2172,"children":2173},{"style":1053},[2174],{"type":998,"value":1100},{"type":993,"tag":1026,"props":2176,"children":2177},{"style":1041},[2178],{"type":998,"value":1105},{"type":993,"tag":1026,"props":2180,"children":2181},{"style":1108},[2182],{"type":998,"value":2183},"\"You passed!\"",{"type":993,"tag":1026,"props":2185,"children":2186},{"style":1041},[2187],{"type":998,"value":1116},{"type":993,"tag":1026,"props":2189,"children":2190},{"class":1028,"line":72},[2191,2195],{"type":993,"tag":1026,"props":2192,"children":2193},{"style":1047},[2194],{"type":998,"value":1634},{"type":993,"tag":1026,"props":2196,"children":2197},{"style":1041},[2198],{"type":998,"value":1092},{"type":993,"tag":1026,"props":2200,"children":2201},{"class":1028,"line":81},[2202,2206,2210,2215],{"type":993,"tag":1026,"props":2203,"children":2204},{"style":1053},[2205],{"type":998,"value":1100},{"type":993,"tag":1026,"props":2207,"children":2208},{"style":1041},[2209],{"type":998,"value":1105},{"type":993,"tag":1026,"props":2211,"children":2212},{"style":1108},[2213],{"type":998,"value":2214},"\"You failed.\"",{"type":993,"tag":1026,"props":2216,"children":2217},{"style":1041},[2218],{"type":998,"value":1116},{"type":993,"tag":1001,"props":2220,"children":2221},{},[2222],{"type":993,"tag":1195,"props":2223,"children":2224},{},[2225],{"type":998,"value":2226},"Key Learning Points:",{"type":993,"tag":1201,"props":2228,"children":2229},{},[2230,2242,2253,2264],{"type":993,"tag":1205,"props":2231,"children":2232},{},[2233,2235,2240],{"type":998,"value":2234},"📌 ",{"type":993,"tag":1195,"props":2236,"children":2237},{},[2238],{"type":998,"value":2239},"if statement",{"type":998,"value":2241},": Checks if a condition is True",{"type":993,"tag":1205,"props":2243,"children":2244},{},[2245,2246,2251],{"type":998,"value":2234},{"type":993,"tag":1195,"props":2247,"children":2248},{},[2249],{"type":998,"value":2250},"else statement",{"type":998,"value":2252},": Runs when the if condition is False",{"type":993,"tag":1205,"props":2254,"children":2255},{},[2256,2257,2262],{"type":998,"value":2234},{"type":993,"tag":1195,"props":2258,"children":2259},{},[2260],{"type":998,"value":2261},"Comparison operators",{"type":998,"value":2263},": Use >= and == to make conditions",{"type":993,"tag":1205,"props":2265,"children":2266},{},[2267,2268,2273],{"type":998,"value":2234},{"type":993,"tag":1195,"props":2269,"children":2270},{},[2271],{"type":998,"value":2272},"Indentation",{"type":998,"value":2274},": Code inside if/else must be indented",{"type":993,"tag":1166,"props":2276,"children":2278},{"id":2277},"nested-if-statements",[2279],{"type":998,"value":2280},"🪆 Nested If Statements",{"type":993,"tag":1001,"props":2282,"children":2283},{},[2284],{"type":998,"value":2285},"You can place if statements inside other if statements to create more complex decision logic. This is called nesting and allows you to check multiple conditions in sequence.",{"type":993,"tag":1185,"props":2287,"children":2291},{"emoji":2288,"title":2289,"type":2290},"🪆","Nested If Statement Guidelines","warning",[2292,2300,2328,2336,2379,2389],{"type":993,"tag":1001,"props":2293,"children":2294},{},[2295],{"type":993,"tag":1195,"props":2296,"children":2297},{},[2298],{"type":998,"value":2299},"Nesting Characteristics:",{"type":993,"tag":1201,"props":2301,"children":2302},{},[2303,2308,2313,2323],{"type":993,"tag":1205,"props":2304,"children":2305},{},[2306],{"type":998,"value":2307},"If statements inside other if statements",{"type":993,"tag":1205,"props":2309,"children":2310},{},[2311],{"type":998,"value":2312},"Each level adds additional indentation",{"type":993,"tag":1205,"props":2314,"children":2315},{},[2316,2318],{"type":998,"value":2317},"Inner conditions only checked if ",{"type":993,"tag":1195,"props":2319,"children":2320},{},[2321],{"type":998,"value":2322},"outer condition is True",{"type":993,"tag":1205,"props":2324,"children":2325},{},[2326],{"type":998,"value":2327},"Can create complex decision trees",{"type":993,"tag":1001,"props":2329,"children":2330},{},[2331],{"type":993,"tag":1195,"props":2332,"children":2333},{},[2334],{"type":998,"value":2335},"Best Practices:",{"type":993,"tag":1201,"props":2337,"children":2338},{},[2339,2344,2359,2374],{"type":993,"tag":1205,"props":2340,"children":2341},{},[2342],{"type":998,"value":2343},"Limit nesting depth (2-3 levels maximum)",{"type":993,"tag":1205,"props":2345,"children":2346},{},[2347,2349,2357],{"type":998,"value":2348},"Consider ",{"type":993,"tag":1195,"props":2350,"children":2351},{},[2352],{"type":993,"tag":1313,"props":2353,"children":2354},{"href":206},[2355],{"type":998,"value":2356},"elif statements",{"type":998,"value":2358}," for multiple conditions",{"type":993,"tag":1205,"props":2360,"children":2361},{},[2362,2364,2372],{"type":998,"value":2363},"Use descriptive ",{"type":993,"tag":1195,"props":2365,"children":2366},{},[2367],{"type":993,"tag":1313,"props":2368,"children":2369},{"href":68},[2370],{"type":998,"value":2371},"variable names",{"type":998,"value":2373}," for clarity",{"type":993,"tag":1205,"props":2375,"children":2376},{},[2377],{"type":998,"value":2378},"Break complex logic into functions when needed",{"type":993,"tag":1001,"props":2380,"children":2381},{},[2382,2387],{"type":993,"tag":1195,"props":2383,"children":2384},{},[2385],{"type":998,"value":2386},"Readability:",{"type":998,"value":2388}," Deep nesting reduces code clarity",{"type":993,"tag":1001,"props":2390,"children":2391},{},[2392,2397],{"type":993,"tag":1195,"props":2393,"children":2394},{},[2395],{"type":998,"value":2396},"Alternative:",{"type":998,"value":2398}," Consider elif chains or separate functions",{"type":993,"tag":1001,"props":2400,"children":2401},{},[2402],{"type":998,"value":2403},"Nested if statements are useful when you need to check additional conditions only after the first condition is true. Each level of nesting adds another layer of decision making.",{"type":993,"tag":1012,"props":2405,"children":2406},{},[2407],{"type":993,"tag":1016,"props":2408,"children":2410},{"className":1018,"code":2409,"language":6,"meta":8,"style":8},"# Nested if statements\nweather = \"sunny\"\ntemperature = 80\n\nif weather == \"sunny\":\n    print(\"It's a sunny day!\")\n    \n    if temperature > 75:\n        print(\"Perfect weather for the beach!\")\n    else:\n        print(\"Nice weather for a walk!\")\nelse:\n    print(\"Not sunny today.\")\n    \n    if temperature \u003C 60:\n        print(\"It's quite cold too!\")\n",[2411],{"type":993,"tag":1022,"props":2412,"children":2413},{"__ignoreMap":8},[2414,2422,2438,2454,2461,2484,2504,2512,2537,2558,2570,2590,2601,2621,2628,2653],{"type":993,"tag":1026,"props":2415,"children":2416},{"class":1028,"line":12},[2417],{"type":993,"tag":1026,"props":2418,"children":2419},{"style":1032},[2420],{"type":998,"value":2421},"# Nested if statements\n",{"type":993,"tag":1026,"props":2423,"children":2424},{"class":1028,"line":27},[2425,2429,2433],{"type":993,"tag":1026,"props":2426,"children":2427},{"style":1041},[2428],{"type":998,"value":1906},{"type":993,"tag":1026,"props":2430,"children":2431},{"style":1047},[2432],{"type":998,"value":1050},{"type":993,"tag":1026,"props":2434,"children":2435},{"style":1108},[2436],{"type":998,"value":2437}," \"sunny\"\n",{"type":993,"tag":1026,"props":2439,"children":2440},{"class":1028,"line":36},[2441,2445,2449],{"type":993,"tag":1026,"props":2442,"children":2443},{"style":1041},[2444],{"type":998,"value":1355},{"type":993,"tag":1026,"props":2446,"children":2447},{"style":1047},[2448],{"type":998,"value":1050},{"type":993,"tag":1026,"props":2450,"children":2451},{"style":1053},[2452],{"type":998,"value":2453}," 80\n",{"type":993,"tag":1026,"props":2455,"children":2456},{"class":1028,"line":45},[2457],{"type":993,"tag":1026,"props":2458,"children":2459},{"emptyLinePlaceholder":13},[2460],{"type":998,"value":1064},{"type":993,"tag":1026,"props":2462,"children":2463},{"class":1028,"line":54},[2464,2468,2472,2476,2480],{"type":993,"tag":1026,"props":2465,"children":2466},{"style":1047},[2467],{"type":998,"value":1072},{"type":993,"tag":1026,"props":2469,"children":2470},{"style":1041},[2471],{"type":998,"value":1927},{"type":993,"tag":1026,"props":2473,"children":2474},{"style":1047},[2475],{"type":998,"value":1932},{"type":993,"tag":1026,"props":2477,"children":2478},{"style":1108},[2479],{"type":998,"value":1937},{"type":993,"tag":1026,"props":2481,"children":2482},{"style":1041},[2483],{"type":998,"value":1092},{"type":993,"tag":1026,"props":2485,"children":2486},{"class":1028,"line":63},[2487,2491,2495,2500],{"type":993,"tag":1026,"props":2488,"children":2489},{"style":1053},[2490],{"type":998,"value":1100},{"type":993,"tag":1026,"props":2492,"children":2493},{"style":1041},[2494],{"type":998,"value":1105},{"type":993,"tag":1026,"props":2496,"children":2497},{"style":1108},[2498],{"type":998,"value":2499},"\"It's a sunny day!\"",{"type":993,"tag":1026,"props":2501,"children":2502},{"style":1041},[2503],{"type":998,"value":1116},{"type":993,"tag":1026,"props":2505,"children":2506},{"class":1028,"line":72},[2507],{"type":993,"tag":1026,"props":2508,"children":2509},{"style":1041},[2510],{"type":998,"value":2511},"    \n",{"type":993,"tag":1026,"props":2513,"children":2514},{"class":1028,"line":81},[2515,2520,2524,2528,2533],{"type":993,"tag":1026,"props":2516,"children":2517},{"style":1047},[2518],{"type":998,"value":2519},"    if",{"type":993,"tag":1026,"props":2521,"children":2522},{"style":1041},[2523],{"type":998,"value":1417},{"type":993,"tag":1026,"props":2525,"children":2526},{"style":1047},[2527],{"type":998,"value":1422},{"type":993,"tag":1026,"props":2529,"children":2530},{"style":1053},[2531],{"type":998,"value":2532}," 75",{"type":993,"tag":1026,"props":2534,"children":2535},{"style":1041},[2536],{"type":998,"value":1092},{"type":993,"tag":1026,"props":2538,"children":2539},{"class":1028,"line":91},[2540,2545,2549,2554],{"type":993,"tag":1026,"props":2541,"children":2542},{"style":1053},[2543],{"type":998,"value":2544},"        print",{"type":993,"tag":1026,"props":2546,"children":2547},{"style":1041},[2548],{"type":998,"value":1105},{"type":993,"tag":1026,"props":2550,"children":2551},{"style":1108},[2552],{"type":998,"value":2553},"\"Perfect weather for the beach!\"",{"type":993,"tag":1026,"props":2555,"children":2556},{"style":1041},[2557],{"type":998,"value":1116},{"type":993,"tag":1026,"props":2559,"children":2560},{"class":1028,"line":100},[2561,2566],{"type":993,"tag":1026,"props":2562,"children":2563},{"style":1047},[2564],{"type":998,"value":2565},"    else",{"type":993,"tag":1026,"props":2567,"children":2568},{"style":1041},[2569],{"type":998,"value":1092},{"type":993,"tag":1026,"props":2571,"children":2572},{"class":1028,"line":109},[2573,2577,2581,2586],{"type":993,"tag":1026,"props":2574,"children":2575},{"style":1053},[2576],{"type":998,"value":2544},{"type":993,"tag":1026,"props":2578,"children":2579},{"style":1041},[2580],{"type":998,"value":1105},{"type":993,"tag":1026,"props":2582,"children":2583},{"style":1108},[2584],{"type":998,"value":2585},"\"Nice weather for a walk!\"",{"type":993,"tag":1026,"props":2587,"children":2588},{"style":1041},[2589],{"type":998,"value":1116},{"type":993,"tag":1026,"props":2591,"children":2592},{"class":1028,"line":118},[2593,2597],{"type":993,"tag":1026,"props":2594,"children":2595},{"style":1047},[2596],{"type":998,"value":1634},{"type":993,"tag":1026,"props":2598,"children":2599},{"style":1041},[2600],{"type":998,"value":1092},{"type":993,"tag":1026,"props":2602,"children":2603},{"class":1028,"line":127},[2604,2608,2612,2617],{"type":993,"tag":1026,"props":2605,"children":2606},{"style":1053},[2607],{"type":998,"value":1100},{"type":993,"tag":1026,"props":2609,"children":2610},{"style":1041},[2611],{"type":998,"value":1105},{"type":993,"tag":1026,"props":2613,"children":2614},{"style":1108},[2615],{"type":998,"value":2616},"\"Not sunny today.\"",{"type":993,"tag":1026,"props":2618,"children":2619},{"style":1041},[2620],{"type":998,"value":1116},{"type":993,"tag":1026,"props":2622,"children":2623},{"class":1028,"line":136},[2624],{"type":993,"tag":1026,"props":2625,"children":2626},{"style":1041},[2627],{"type":998,"value":2511},{"type":993,"tag":1026,"props":2629,"children":2630},{"class":1028,"line":146},[2631,2635,2639,2644,2649],{"type":993,"tag":1026,"props":2632,"children":2633},{"style":1047},[2634],{"type":998,"value":2519},{"type":993,"tag":1026,"props":2636,"children":2637},{"style":1041},[2638],{"type":998,"value":1417},{"type":993,"tag":1026,"props":2640,"children":2641},{"style":1047},[2642],{"type":998,"value":2643},"\u003C",{"type":993,"tag":1026,"props":2645,"children":2646},{"style":1053},[2647],{"type":998,"value":2648}," 60",{"type":993,"tag":1026,"props":2650,"children":2651},{"style":1041},[2652],{"type":998,"value":1092},{"type":993,"tag":1026,"props":2654,"children":2655},{"class":1028,"line":155},[2656,2660,2664,2669],{"type":993,"tag":1026,"props":2657,"children":2658},{"style":1053},[2659],{"type":998,"value":2544},{"type":993,"tag":1026,"props":2661,"children":2662},{"style":1041},[2663],{"type":998,"value":1105},{"type":993,"tag":1026,"props":2665,"children":2666},{"style":1108},[2667],{"type":998,"value":2668},"\"It's quite cold too!\"",{"type":993,"tag":1026,"props":2670,"children":2671},{"style":1041},[2672],{"type":998,"value":1116},{"type":993,"tag":1166,"props":2674,"children":2676},{"id":2675},"working-with-different-data-types",[2677],{"type":998,"value":2678},"🎲 Working with Different Data Types",{"type":993,"tag":1001,"props":2680,"children":2681},{},[2682],{"type":998,"value":2683},"If statements work with any expression that can be evaluated as true or false. Numbers, strings, lists, and other data types all have truthiness values that you can use in conditions.",{"type":993,"tag":1185,"props":2685,"children":2688},{"emoji":2686,"title":2687,"type":1189},"🎲","Truthiness in Conditional Statements",[2689,2697,2796,2804,2901,2911],{"type":993,"tag":1001,"props":2690,"children":2691},{},[2692],{"type":993,"tag":1195,"props":2693,"children":2694},{},[2695],{"type":998,"value":2696},"Truthy Values (evaluate to True):",{"type":993,"tag":1201,"props":2698,"children":2699},{},[2700,2731,2760,2782],{"type":993,"tag":1205,"props":2701,"children":2702},{},[2703,2708,2710,2716,2718,2724,2725],{"type":993,"tag":1195,"props":2704,"children":2705},{},[2706],{"type":998,"value":2707},"Non-zero numbers",{"type":998,"value":2709},": ",{"type":993,"tag":1022,"props":2711,"children":2713},{"className":2712},[],[2714],{"type":998,"value":2715},"1",{"type":998,"value":2717},", ",{"type":993,"tag":1022,"props":2719,"children":2721},{"className":2720},[],[2722],{"type":998,"value":2723},"-5",{"type":998,"value":2717},{"type":993,"tag":1022,"props":2726,"children":2728},{"className":2727},[],[2729],{"type":998,"value":2730},"3.14",{"type":993,"tag":1205,"props":2732,"children":2733},{},[2734,2739,2740,2746,2747,2753,2754],{"type":993,"tag":1195,"props":2735,"children":2736},{},[2737],{"type":998,"value":2738},"Non-empty strings",{"type":998,"value":2709},{"type":993,"tag":1022,"props":2741,"children":2743},{"className":2742},[],[2744],{"type":998,"value":2745},"\"hello\"",{"type":998,"value":2717},{"type":993,"tag":1022,"props":2748,"children":2750},{"className":2749},[],[2751],{"type":998,"value":2752},"\"0\"",{"type":998,"value":2717},{"type":993,"tag":1022,"props":2755,"children":2757},{"className":2756},[],[2758],{"type":998,"value":2759},"\" \"",{"type":993,"tag":1205,"props":2761,"children":2762},{},[2763,2768,2769,2775,2776],{"type":993,"tag":1195,"props":2764,"children":2765},{},[2766],{"type":998,"value":2767},"Non-empty collections",{"type":998,"value":2709},{"type":993,"tag":1022,"props":2770,"children":2772},{"className":2771},[],[2773],{"type":998,"value":2774},"[1, 2]",{"type":998,"value":2717},{"type":993,"tag":1022,"props":2777,"children":2779},{"className":2778},[],[2780],{"type":998,"value":2781},"{\"key\": \"value\"}",{"type":993,"tag":1205,"props":2783,"children":2784},{},[2785,2790,2791],{"type":993,"tag":1195,"props":2786,"children":2787},{},[2788],{"type":998,"value":2789},"Boolean True",{"type":998,"value":2709},{"type":993,"tag":1022,"props":2792,"children":2794},{"className":2793},[],[2795],{"type":998,"value":1572},{"type":993,"tag":1001,"props":2797,"children":2798},{},[2799],{"type":993,"tag":1195,"props":2800,"children":2801},{},[2802],{"type":998,"value":2803},"Falsy Values (evaluate to False):",{"type":993,"tag":1201,"props":2805,"children":2806},{},[2807,2829,2851,2880],{"type":993,"tag":1205,"props":2808,"children":2809},{},[2810,2815,2816,2822,2823],{"type":993,"tag":1195,"props":2811,"children":2812},{},[2813],{"type":998,"value":2814},"Zero numbers",{"type":998,"value":2709},{"type":993,"tag":1022,"props":2817,"children":2819},{"className":2818},[],[2820],{"type":998,"value":2821},"0",{"type":998,"value":2717},{"type":993,"tag":1022,"props":2824,"children":2826},{"className":2825},[],[2827],{"type":998,"value":2828},"0.0",{"type":993,"tag":1205,"props":2830,"children":2831},{},[2832,2837,2838,2844,2845],{"type":993,"tag":1195,"props":2833,"children":2834},{},[2835],{"type":998,"value":2836},"Empty strings",{"type":998,"value":2709},{"type":993,"tag":1022,"props":2839,"children":2841},{"className":2840},[],[2842],{"type":998,"value":2843},"\"\"",{"type":998,"value":2717},{"type":993,"tag":1022,"props":2846,"children":2848},{"className":2847},[],[2849],{"type":998,"value":2850},"''",{"type":993,"tag":1205,"props":2852,"children":2853},{},[2854,2859,2860,2866,2867,2873,2874],{"type":993,"tag":1195,"props":2855,"children":2856},{},[2857],{"type":998,"value":2858},"Empty collections",{"type":998,"value":2709},{"type":993,"tag":1022,"props":2861,"children":2863},{"className":2862},[],[2864],{"type":998,"value":2865},"[]",{"type":998,"value":2717},{"type":993,"tag":1022,"props":2868,"children":2870},{"className":2869},[],[2871],{"type":998,"value":2872},"{}",{"type":998,"value":2717},{"type":993,"tag":1022,"props":2875,"children":2877},{"className":2876},[],[2878],{"type":998,"value":2879},"set()",{"type":993,"tag":1205,"props":2881,"children":2882},{},[2883,2888,2889,2894,2895],{"type":993,"tag":1195,"props":2884,"children":2885},{},[2886],{"type":998,"value":2887},"Boolean False",{"type":998,"value":2709},{"type":993,"tag":1022,"props":2890,"children":2892},{"className":2891},[],[2893],{"type":998,"value":1579},{"type":998,"value":2717},{"type":993,"tag":1022,"props":2896,"children":2898},{"className":2897},[],[2899],{"type":998,"value":2900},"None",{"type":993,"tag":1001,"props":2902,"children":2903},{},[2904,2909],{"type":993,"tag":1195,"props":2905,"children":2906},{},[2907],{"type":998,"value":2908},"Flexibility:",{"type":998,"value":2910}," Any expression can be used as a condition",{"type":993,"tag":1001,"props":2912,"children":2913},{},[2914,2919],{"type":993,"tag":1195,"props":2915,"children":2916},{},[2917],{"type":998,"value":2918},"Implicit Conversion:",{"type":998,"value":2920}," Python automatically converts values to boolean context",{"type":993,"tag":1001,"props":2922,"children":2923},{},[2924,2926,2934],{"type":998,"value":2925},"Understanding how different data types behave in conditions helps you write more flexible and powerful conditional logic using ",{"type":993,"tag":1195,"props":2927,"children":2928},{},[2929],{"type":993,"tag":1313,"props":2930,"children":2931},{"href":123},[2932],{"type":998,"value":2933},"type conversion",{"type":998,"value":2935},".",{"type":993,"tag":1012,"props":2937,"children":2938},{},[2939],{"type":993,"tag":1016,"props":2940,"children":2942},{"className":1018,"code":2941,"language":6,"meta":8,"style":8},"# If statements with different data types\nname = \"Alice\"\nnumbers = [1, 2, 3]\nempty_list = []\nzero = 0\n\nif name:  # Non-empty strings are truthy\n    print(f\"Hello, {name}!\")\n\nif numbers:  # Non-empty lists are truthy\n    print(f\"List has {len(numbers)} items\")\n\nif empty_list:  # Empty lists are falsy\n    print(\"This won't print\")\nelse:\n    print(\"The list is empty\")\n\nif zero:  # Zero is falsy\n    print(\"This won't print\")\nelse:\n    print(\"Zero is falsy\")\n\n# Using truthiness for validation\nuser_input = \"\"\nif user_input:\n    print(f\"You entered: {user_input}\")\nelse:\n    print(\"No input provided\")\n",[2943],{"type":993,"tag":1022,"props":2944,"children":2945},{"__ignoreMap":8},[2946,2954,2971,3015,3032,3049,3056,3073,3115,3122,3139,3182,3189,3206,3226,3237,3257,3264,3281,3300,3311,3331,3338,3346,3363,3375,3416,3427],{"type":993,"tag":1026,"props":2947,"children":2948},{"class":1028,"line":12},[2949],{"type":993,"tag":1026,"props":2950,"children":2951},{"style":1032},[2952],{"type":998,"value":2953},"# If statements with different data types\n",{"type":993,"tag":1026,"props":2955,"children":2956},{"class":1028,"line":27},[2957,2962,2966],{"type":993,"tag":1026,"props":2958,"children":2959},{"style":1041},[2960],{"type":998,"value":2961},"name ",{"type":993,"tag":1026,"props":2963,"children":2964},{"style":1047},[2965],{"type":998,"value":1050},{"type":993,"tag":1026,"props":2967,"children":2968},{"style":1108},[2969],{"type":998,"value":2970}," \"Alice\"\n",{"type":993,"tag":1026,"props":2972,"children":2973},{"class":1028,"line":36},[2974,2979,2983,2988,2992,2996,3001,3005,3010],{"type":993,"tag":1026,"props":2975,"children":2976},{"style":1041},[2977],{"type":998,"value":2978},"numbers ",{"type":993,"tag":1026,"props":2980,"children":2981},{"style":1047},[2982],{"type":998,"value":1050},{"type":993,"tag":1026,"props":2984,"children":2985},{"style":1041},[2986],{"type":998,"value":2987}," [",{"type":993,"tag":1026,"props":2989,"children":2990},{"style":1053},[2991],{"type":998,"value":2715},{"type":993,"tag":1026,"props":2993,"children":2994},{"style":1041},[2995],{"type":998,"value":2717},{"type":993,"tag":1026,"props":2997,"children":2998},{"style":1053},[2999],{"type":998,"value":3000},"2",{"type":993,"tag":1026,"props":3002,"children":3003},{"style":1041},[3004],{"type":998,"value":2717},{"type":993,"tag":1026,"props":3006,"children":3007},{"style":1053},[3008],{"type":998,"value":3009},"3",{"type":993,"tag":1026,"props":3011,"children":3012},{"style":1041},[3013],{"type":998,"value":3014},"]\n",{"type":993,"tag":1026,"props":3016,"children":3017},{"class":1028,"line":45},[3018,3023,3027],{"type":993,"tag":1026,"props":3019,"children":3020},{"style":1041},[3021],{"type":998,"value":3022},"empty_list ",{"type":993,"tag":1026,"props":3024,"children":3025},{"style":1047},[3026],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3028,"children":3029},{"style":1041},[3030],{"type":998,"value":3031}," []\n",{"type":993,"tag":1026,"props":3033,"children":3034},{"class":1028,"line":54},[3035,3040,3044],{"type":993,"tag":1026,"props":3036,"children":3037},{"style":1041},[3038],{"type":998,"value":3039},"zero ",{"type":993,"tag":1026,"props":3041,"children":3042},{"style":1047},[3043],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3045,"children":3046},{"style":1053},[3047],{"type":998,"value":3048}," 0\n",{"type":993,"tag":1026,"props":3050,"children":3051},{"class":1028,"line":63},[3052],{"type":993,"tag":1026,"props":3053,"children":3054},{"emptyLinePlaceholder":13},[3055],{"type":998,"value":1064},{"type":993,"tag":1026,"props":3057,"children":3058},{"class":1028,"line":72},[3059,3063,3068],{"type":993,"tag":1026,"props":3060,"children":3061},{"style":1047},[3062],{"type":998,"value":1072},{"type":993,"tag":1026,"props":3064,"children":3065},{"style":1041},[3066],{"type":998,"value":3067}," name:  ",{"type":993,"tag":1026,"props":3069,"children":3070},{"style":1032},[3071],{"type":998,"value":3072},"# Non-empty strings are truthy\n",{"type":993,"tag":1026,"props":3074,"children":3075},{"class":1028,"line":81},[3076,3080,3084,3088,3093,3097,3102,3106,3111],{"type":993,"tag":1026,"props":3077,"children":3078},{"style":1053},[3079],{"type":998,"value":1100},{"type":993,"tag":1026,"props":3081,"children":3082},{"style":1041},[3083],{"type":998,"value":1105},{"type":993,"tag":1026,"props":3085,"children":3086},{"style":1047},[3087],{"type":998,"value":1854},{"type":993,"tag":1026,"props":3089,"children":3090},{"style":1108},[3091],{"type":998,"value":3092},"\"Hello, ",{"type":993,"tag":1026,"props":3094,"children":3095},{"style":1053},[3096],{"type":998,"value":1864},{"type":993,"tag":1026,"props":3098,"children":3099},{"style":1041},[3100],{"type":998,"value":3101},"name",{"type":993,"tag":1026,"props":3103,"children":3104},{"style":1053},[3105],{"type":998,"value":1874},{"type":993,"tag":1026,"props":3107,"children":3108},{"style":1108},[3109],{"type":998,"value":3110},"!\"",{"type":993,"tag":1026,"props":3112,"children":3113},{"style":1041},[3114],{"type":998,"value":1116},{"type":993,"tag":1026,"props":3116,"children":3117},{"class":1028,"line":91},[3118],{"type":993,"tag":1026,"props":3119,"children":3120},{"emptyLinePlaceholder":13},[3121],{"type":998,"value":1064},{"type":993,"tag":1026,"props":3123,"children":3124},{"class":1028,"line":100},[3125,3129,3134],{"type":993,"tag":1026,"props":3126,"children":3127},{"style":1047},[3128],{"type":998,"value":1072},{"type":993,"tag":1026,"props":3130,"children":3131},{"style":1041},[3132],{"type":998,"value":3133}," numbers:  ",{"type":993,"tag":1026,"props":3135,"children":3136},{"style":1032},[3137],{"type":998,"value":3138},"# Non-empty lists are truthy\n",{"type":993,"tag":1026,"props":3140,"children":3141},{"class":1028,"line":109},[3142,3146,3150,3154,3159,3164,3169,3173,3178],{"type":993,"tag":1026,"props":3143,"children":3144},{"style":1053},[3145],{"type":998,"value":1100},{"type":993,"tag":1026,"props":3147,"children":3148},{"style":1041},[3149],{"type":998,"value":1105},{"type":993,"tag":1026,"props":3151,"children":3152},{"style":1047},[3153],{"type":998,"value":1854},{"type":993,"tag":1026,"props":3155,"children":3156},{"style":1108},[3157],{"type":998,"value":3158},"\"List has ",{"type":993,"tag":1026,"props":3160,"children":3161},{"style":1053},[3162],{"type":998,"value":3163},"{len",{"type":993,"tag":1026,"props":3165,"children":3166},{"style":1041},[3167],{"type":998,"value":3168},"(numbers)",{"type":993,"tag":1026,"props":3170,"children":3171},{"style":1053},[3172],{"type":998,"value":1874},{"type":993,"tag":1026,"props":3174,"children":3175},{"style":1108},[3176],{"type":998,"value":3177}," items\"",{"type":993,"tag":1026,"props":3179,"children":3180},{"style":1041},[3181],{"type":998,"value":1116},{"type":993,"tag":1026,"props":3183,"children":3184},{"class":1028,"line":118},[3185],{"type":993,"tag":1026,"props":3186,"children":3187},{"emptyLinePlaceholder":13},[3188],{"type":998,"value":1064},{"type":993,"tag":1026,"props":3190,"children":3191},{"class":1028,"line":127},[3192,3196,3201],{"type":993,"tag":1026,"props":3193,"children":3194},{"style":1047},[3195],{"type":998,"value":1072},{"type":993,"tag":1026,"props":3197,"children":3198},{"style":1041},[3199],{"type":998,"value":3200}," empty_list:  ",{"type":993,"tag":1026,"props":3202,"children":3203},{"style":1032},[3204],{"type":998,"value":3205},"# Empty lists are falsy\n",{"type":993,"tag":1026,"props":3207,"children":3208},{"class":1028,"line":136},[3209,3213,3217,3222],{"type":993,"tag":1026,"props":3210,"children":3211},{"style":1053},[3212],{"type":998,"value":1100},{"type":993,"tag":1026,"props":3214,"children":3215},{"style":1041},[3216],{"type":998,"value":1105},{"type":993,"tag":1026,"props":3218,"children":3219},{"style":1108},[3220],{"type":998,"value":3221},"\"This won't print\"",{"type":993,"tag":1026,"props":3223,"children":3224},{"style":1041},[3225],{"type":998,"value":1116},{"type":993,"tag":1026,"props":3227,"children":3228},{"class":1028,"line":146},[3229,3233],{"type":993,"tag":1026,"props":3230,"children":3231},{"style":1047},[3232],{"type":998,"value":1634},{"type":993,"tag":1026,"props":3234,"children":3235},{"style":1041},[3236],{"type":998,"value":1092},{"type":993,"tag":1026,"props":3238,"children":3239},{"class":1028,"line":155},[3240,3244,3248,3253],{"type":993,"tag":1026,"props":3241,"children":3242},{"style":1053},[3243],{"type":998,"value":1100},{"type":993,"tag":1026,"props":3245,"children":3246},{"style":1041},[3247],{"type":998,"value":1105},{"type":993,"tag":1026,"props":3249,"children":3250},{"style":1108},[3251],{"type":998,"value":3252},"\"The list is empty\"",{"type":993,"tag":1026,"props":3254,"children":3255},{"style":1041},[3256],{"type":998,"value":1116},{"type":993,"tag":1026,"props":3258,"children":3259},{"class":1028,"line":164},[3260],{"type":993,"tag":1026,"props":3261,"children":3262},{"emptyLinePlaceholder":13},[3263],{"type":998,"value":1064},{"type":993,"tag":1026,"props":3265,"children":3266},{"class":1028,"line":173},[3267,3271,3276],{"type":993,"tag":1026,"props":3268,"children":3269},{"style":1047},[3270],{"type":998,"value":1072},{"type":993,"tag":1026,"props":3272,"children":3273},{"style":1041},[3274],{"type":998,"value":3275}," zero:  ",{"type":993,"tag":1026,"props":3277,"children":3278},{"style":1032},[3279],{"type":998,"value":3280},"# Zero is falsy\n",{"type":993,"tag":1026,"props":3282,"children":3283},{"class":1028,"line":182},[3284,3288,3292,3296],{"type":993,"tag":1026,"props":3285,"children":3286},{"style":1053},[3287],{"type":998,"value":1100},{"type":993,"tag":1026,"props":3289,"children":3290},{"style":1041},[3291],{"type":998,"value":1105},{"type":993,"tag":1026,"props":3293,"children":3294},{"style":1108},[3295],{"type":998,"value":3221},{"type":993,"tag":1026,"props":3297,"children":3298},{"style":1041},[3299],{"type":998,"value":1116},{"type":993,"tag":1026,"props":3301,"children":3302},{"class":1028,"line":191},[3303,3307],{"type":993,"tag":1026,"props":3304,"children":3305},{"style":1047},[3306],{"type":998,"value":1634},{"type":993,"tag":1026,"props":3308,"children":3309},{"style":1041},[3310],{"type":998,"value":1092},{"type":993,"tag":1026,"props":3312,"children":3313},{"class":1028,"line":201},[3314,3318,3322,3327],{"type":993,"tag":1026,"props":3315,"children":3316},{"style":1053},[3317],{"type":998,"value":1100},{"type":993,"tag":1026,"props":3319,"children":3320},{"style":1041},[3321],{"type":998,"value":1105},{"type":993,"tag":1026,"props":3323,"children":3324},{"style":1108},[3325],{"type":998,"value":3326},"\"Zero is falsy\"",{"type":993,"tag":1026,"props":3328,"children":3329},{"style":1041},[3330],{"type":998,"value":1116},{"type":993,"tag":1026,"props":3332,"children":3333},{"class":1028,"line":210},[3334],{"type":993,"tag":1026,"props":3335,"children":3336},{"emptyLinePlaceholder":13},[3337],{"type":998,"value":1064},{"type":993,"tag":1026,"props":3339,"children":3340},{"class":1028,"line":219},[3341],{"type":993,"tag":1026,"props":3342,"children":3343},{"style":1032},[3344],{"type":998,"value":3345},"# Using truthiness for validation\n",{"type":993,"tag":1026,"props":3347,"children":3348},{"class":1028,"line":228},[3349,3354,3358],{"type":993,"tag":1026,"props":3350,"children":3351},{"style":1041},[3352],{"type":998,"value":3353},"user_input ",{"type":993,"tag":1026,"props":3355,"children":3356},{"style":1047},[3357],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3359,"children":3360},{"style":1108},[3361],{"type":998,"value":3362}," \"\"\n",{"type":993,"tag":1026,"props":3364,"children":3365},{"class":1028,"line":238},[3366,3370],{"type":993,"tag":1026,"props":3367,"children":3368},{"style":1047},[3369],{"type":998,"value":1072},{"type":993,"tag":1026,"props":3371,"children":3372},{"style":1041},[3373],{"type":998,"value":3374}," user_input:\n",{"type":993,"tag":1026,"props":3376,"children":3377},{"class":1028,"line":247},[3378,3382,3386,3390,3395,3399,3404,3408,3412],{"type":993,"tag":1026,"props":3379,"children":3380},{"style":1053},[3381],{"type":998,"value":1100},{"type":993,"tag":1026,"props":3383,"children":3384},{"style":1041},[3385],{"type":998,"value":1105},{"type":993,"tag":1026,"props":3387,"children":3388},{"style":1047},[3389],{"type":998,"value":1854},{"type":993,"tag":1026,"props":3391,"children":3392},{"style":1108},[3393],{"type":998,"value":3394},"\"You entered: ",{"type":993,"tag":1026,"props":3396,"children":3397},{"style":1053},[3398],{"type":998,"value":1864},{"type":993,"tag":1026,"props":3400,"children":3401},{"style":1041},[3402],{"type":998,"value":3403},"user_input",{"type":993,"tag":1026,"props":3405,"children":3406},{"style":1053},[3407],{"type":998,"value":1874},{"type":993,"tag":1026,"props":3409,"children":3410},{"style":1108},[3411],{"type":998,"value":1879},{"type":993,"tag":1026,"props":3413,"children":3414},{"style":1041},[3415],{"type":998,"value":1116},{"type":993,"tag":1026,"props":3417,"children":3418},{"class":1028,"line":256},[3419,3423],{"type":993,"tag":1026,"props":3420,"children":3421},{"style":1047},[3422],{"type":998,"value":1634},{"type":993,"tag":1026,"props":3424,"children":3425},{"style":1041},[3426],{"type":998,"value":1092},{"type":993,"tag":1026,"props":3428,"children":3429},{"class":1028,"line":265},[3430,3434,3438,3443],{"type":993,"tag":1026,"props":3431,"children":3432},{"style":1053},[3433],{"type":998,"value":1100},{"type":993,"tag":1026,"props":3435,"children":3436},{"style":1041},[3437],{"type":998,"value":1105},{"type":993,"tag":1026,"props":3439,"children":3440},{"style":1108},[3441],{"type":998,"value":3442},"\"No input provided\"",{"type":993,"tag":1026,"props":3444,"children":3445},{"style":1041},[3446],{"type":998,"value":1116},{"type":993,"tag":1166,"props":3448,"children":3450},{"id":3449},"common-if-statement-patterns",[3451],{"type":998,"value":3452},"🎯 Common If Statement Patterns",{"type":993,"tag":1001,"props":3454,"children":3455},{},[3456],{"type":998,"value":3457},"There are several common patterns you'll use frequently when working with if statements. Learning these patterns helps you write more effective conditional code.",{"type":993,"tag":3459,"props":3460,"children":3461},"table",{},[3462,3486],{"type":993,"tag":3463,"props":3464,"children":3465},"thead",{},[3466],{"type":993,"tag":3467,"props":3468,"children":3469},"tr",{},[3470,3476,3481],{"type":993,"tag":3471,"props":3472,"children":3473},"th",{},[3474],{"type":998,"value":3475},"Pattern",{"type":993,"tag":3471,"props":3477,"children":3478},{},[3479],{"type":998,"value":3480},"Example",{"type":993,"tag":3471,"props":3482,"children":3483},{},[3484],{"type":998,"value":3485},"Use Case",{"type":993,"tag":3487,"props":3488,"children":3489},"tbody",{},[3490,3516,3541,3566,3591],{"type":993,"tag":3467,"props":3491,"children":3492},{},[3493,3502,3511],{"type":993,"tag":3494,"props":3495,"children":3496},"td",{},[3497],{"type":993,"tag":1195,"props":3498,"children":3499},{},[3500],{"type":998,"value":3501},"Validation",{"type":993,"tag":3494,"props":3503,"children":3504},{},[3505],{"type":993,"tag":1022,"props":3506,"children":3508},{"className":3507},[],[3509],{"type":998,"value":3510},"if user_input:",{"type":993,"tag":3494,"props":3512,"children":3513},{},[3514],{"type":998,"value":3515},"Check if input exists",{"type":993,"tag":3467,"props":3517,"children":3518},{},[3519,3527,3536],{"type":993,"tag":3494,"props":3520,"children":3521},{},[3522],{"type":993,"tag":1195,"props":3523,"children":3524},{},[3525],{"type":998,"value":3526},"Range Check",{"type":993,"tag":3494,"props":3528,"children":3529},{},[3530],{"type":993,"tag":1022,"props":3531,"children":3533},{"className":3532},[],[3534],{"type":998,"value":3535},"if 0 \u003C= score \u003C= 100:",{"type":993,"tag":3494,"props":3537,"children":3538},{},[3539],{"type":998,"value":3540},"Validate ranges",{"type":993,"tag":3467,"props":3542,"children":3543},{},[3544,3552,3561],{"type":993,"tag":3494,"props":3545,"children":3546},{},[3547],{"type":993,"tag":1195,"props":3548,"children":3549},{},[3550],{"type":998,"value":3551},"Type Check",{"type":993,"tag":3494,"props":3553,"children":3554},{},[3555],{"type":993,"tag":1022,"props":3556,"children":3558},{"className":3557},[],[3559],{"type":998,"value":3560},"if isinstance(x, int):",{"type":993,"tag":3494,"props":3562,"children":3563},{},[3564],{"type":998,"value":3565},"Verify data types",{"type":993,"tag":3467,"props":3567,"children":3568},{},[3569,3577,3586],{"type":993,"tag":3494,"props":3570,"children":3571},{},[3572],{"type":993,"tag":1195,"props":3573,"children":3574},{},[3575],{"type":998,"value":3576},"Membership",{"type":993,"tag":3494,"props":3578,"children":3579},{},[3580],{"type":993,"tag":1022,"props":3581,"children":3583},{"className":3582},[],[3584],{"type":998,"value":3585},"if \"a\" in word:",{"type":993,"tag":3494,"props":3587,"children":3588},{},[3589],{"type":998,"value":3590},"Check if item exists",{"type":993,"tag":3467,"props":3592,"children":3593},{},[3594,3601,3610],{"type":993,"tag":3494,"props":3595,"children":3596},{},[3597],{"type":993,"tag":1195,"props":3598,"children":3599},{},[3600],{"type":998,"value":207},{"type":993,"tag":3494,"props":3602,"children":3603},{},[3604],{"type":993,"tag":1022,"props":3605,"children":3607},{"className":3606},[],[3608],{"type":998,"value":3609},"if age >= 18 and has_id:",{"type":993,"tag":3494,"props":3611,"children":3612},{},[3613],{"type":998,"value":3614},"Complex validation",{"type":993,"tag":1012,"props":3616,"children":3617},{},[3618],{"type":993,"tag":1016,"props":3619,"children":3621},{"className":1018,"code":3620,"language":6,"meta":8,"style":8},"# Common if statement patterns\nprint(\"=== COMMON PATTERNS ===\")\n\n# Input validation\nuser_name = input(\"Enter your name: \") if False else \"Alice\"  # Simulated input\nif user_name:\n    print(f\"Welcome, {user_name}!\")\nelse:\n    print(\"Name is required\")\n\n# Range checking\nage = 25\nif 18 \u003C= age \u003C= 65:\n    print(\"Working age\")\n\n# Membership testing\nvowels = \"aeiou\"\nletter = \"a\"\nif letter in vowels:\n    print(f\"'{letter}' is a vowel\")\n\n# Multiple conditions with logical operators\ntemperature = 72\nhumidity = 40\nif temperature >= 70 and humidity \u003C= 50:\n    print(\"Perfect weather conditions!\")\n",[3622],{"type":993,"tag":1022,"props":3623,"children":3624},{"__ignoreMap":8},[3625,3633,3653,3660,3668,3723,3735,3776,3787,3807,3814,3822,3838,3872,3892,3899,3907,3924,3941,3963,4005,4012,4020,4036,4053,4095],{"type":993,"tag":1026,"props":3626,"children":3627},{"class":1028,"line":12},[3628],{"type":993,"tag":1026,"props":3629,"children":3630},{"style":1032},[3631],{"type":998,"value":3632},"# Common if statement patterns\n",{"type":993,"tag":1026,"props":3634,"children":3635},{"class":1028,"line":27},[3636,3640,3644,3649],{"type":993,"tag":1026,"props":3637,"children":3638},{"style":1053},[3639],{"type":998,"value":1151},{"type":993,"tag":1026,"props":3641,"children":3642},{"style":1041},[3643],{"type":998,"value":1105},{"type":993,"tag":1026,"props":3645,"children":3646},{"style":1108},[3647],{"type":998,"value":3648},"\"=== COMMON PATTERNS ===\"",{"type":993,"tag":1026,"props":3650,"children":3651},{"style":1041},[3652],{"type":998,"value":1116},{"type":993,"tag":1026,"props":3654,"children":3655},{"class":1028,"line":36},[3656],{"type":993,"tag":1026,"props":3657,"children":3658},{"emptyLinePlaceholder":13},[3659],{"type":998,"value":1064},{"type":993,"tag":1026,"props":3661,"children":3662},{"class":1028,"line":45},[3663],{"type":993,"tag":1026,"props":3664,"children":3665},{"style":1032},[3666],{"type":998,"value":3667},"# Input validation\n",{"type":993,"tag":1026,"props":3669,"children":3670},{"class":1028,"line":54},[3671,3676,3680,3685,3689,3694,3699,3703,3708,3713,3718],{"type":993,"tag":1026,"props":3672,"children":3673},{"style":1041},[3674],{"type":998,"value":3675},"user_name ",{"type":993,"tag":1026,"props":3677,"children":3678},{"style":1047},[3679],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3681,"children":3682},{"style":1053},[3683],{"type":998,"value":3684}," input",{"type":993,"tag":1026,"props":3686,"children":3687},{"style":1041},[3688],{"type":998,"value":1105},{"type":993,"tag":1026,"props":3690,"children":3691},{"style":1108},[3692],{"type":998,"value":3693},"\"Enter your name: \"",{"type":993,"tag":1026,"props":3695,"children":3696},{"style":1041},[3697],{"type":998,"value":3698},") ",{"type":993,"tag":1026,"props":3700,"children":3701},{"style":1047},[3702],{"type":998,"value":1072},{"type":993,"tag":1026,"props":3704,"children":3705},{"style":1053},[3706],{"type":998,"value":3707}," False",{"type":993,"tag":1026,"props":3709,"children":3710},{"style":1047},[3711],{"type":998,"value":3712}," else",{"type":993,"tag":1026,"props":3714,"children":3715},{"style":1108},[3716],{"type":998,"value":3717}," \"Alice\"",{"type":993,"tag":1026,"props":3719,"children":3720},{"style":1032},[3721],{"type":998,"value":3722},"  # Simulated input\n",{"type":993,"tag":1026,"props":3724,"children":3725},{"class":1028,"line":63},[3726,3730],{"type":993,"tag":1026,"props":3727,"children":3728},{"style":1047},[3729],{"type":998,"value":1072},{"type":993,"tag":1026,"props":3731,"children":3732},{"style":1041},[3733],{"type":998,"value":3734}," user_name:\n",{"type":993,"tag":1026,"props":3736,"children":3737},{"class":1028,"line":72},[3738,3742,3746,3750,3755,3759,3764,3768,3772],{"type":993,"tag":1026,"props":3739,"children":3740},{"style":1053},[3741],{"type":998,"value":1100},{"type":993,"tag":1026,"props":3743,"children":3744},{"style":1041},[3745],{"type":998,"value":1105},{"type":993,"tag":1026,"props":3747,"children":3748},{"style":1047},[3749],{"type":998,"value":1854},{"type":993,"tag":1026,"props":3751,"children":3752},{"style":1108},[3753],{"type":998,"value":3754},"\"Welcome, ",{"type":993,"tag":1026,"props":3756,"children":3757},{"style":1053},[3758],{"type":998,"value":1864},{"type":993,"tag":1026,"props":3760,"children":3761},{"style":1041},[3762],{"type":998,"value":3763},"user_name",{"type":993,"tag":1026,"props":3765,"children":3766},{"style":1053},[3767],{"type":998,"value":1874},{"type":993,"tag":1026,"props":3769,"children":3770},{"style":1108},[3771],{"type":998,"value":3110},{"type":993,"tag":1026,"props":3773,"children":3774},{"style":1041},[3775],{"type":998,"value":1116},{"type":993,"tag":1026,"props":3777,"children":3778},{"class":1028,"line":81},[3779,3783],{"type":993,"tag":1026,"props":3780,"children":3781},{"style":1047},[3782],{"type":998,"value":1634},{"type":993,"tag":1026,"props":3784,"children":3785},{"style":1041},[3786],{"type":998,"value":1092},{"type":993,"tag":1026,"props":3788,"children":3789},{"class":1028,"line":91},[3790,3794,3798,3803],{"type":993,"tag":1026,"props":3791,"children":3792},{"style":1053},[3793],{"type":998,"value":1100},{"type":993,"tag":1026,"props":3795,"children":3796},{"style":1041},[3797],{"type":998,"value":1105},{"type":993,"tag":1026,"props":3799,"children":3800},{"style":1108},[3801],{"type":998,"value":3802},"\"Name is required\"",{"type":993,"tag":1026,"props":3804,"children":3805},{"style":1041},[3806],{"type":998,"value":1116},{"type":993,"tag":1026,"props":3808,"children":3809},{"class":1028,"line":100},[3810],{"type":993,"tag":1026,"props":3811,"children":3812},{"emptyLinePlaceholder":13},[3813],{"type":998,"value":1064},{"type":993,"tag":1026,"props":3815,"children":3816},{"class":1028,"line":109},[3817],{"type":993,"tag":1026,"props":3818,"children":3819},{"style":1032},[3820],{"type":998,"value":3821},"# Range checking\n",{"type":993,"tag":1026,"props":3823,"children":3824},{"class":1028,"line":118},[3825,3829,3833],{"type":993,"tag":1026,"props":3826,"children":3827},{"style":1041},[3828],{"type":998,"value":1044},{"type":993,"tag":1026,"props":3830,"children":3831},{"style":1047},[3832],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3834,"children":3835},{"style":1053},[3836],{"type":998,"value":3837}," 25\n",{"type":993,"tag":1026,"props":3839,"children":3840},{"class":1028,"line":127},[3841,3845,3849,3854,3858,3863,3868],{"type":993,"tag":1026,"props":3842,"children":3843},{"style":1047},[3844],{"type":998,"value":1072},{"type":993,"tag":1026,"props":3846,"children":3847},{"style":1053},[3848],{"type":998,"value":1087},{"type":993,"tag":1026,"props":3850,"children":3851},{"style":1047},[3852],{"type":998,"value":3853}," \u003C=",{"type":993,"tag":1026,"props":3855,"children":3856},{"style":1041},[3857],{"type":998,"value":1077},{"type":993,"tag":1026,"props":3859,"children":3860},{"style":1047},[3861],{"type":998,"value":3862},"\u003C=",{"type":993,"tag":1026,"props":3864,"children":3865},{"style":1053},[3866],{"type":998,"value":3867}," 65",{"type":993,"tag":1026,"props":3869,"children":3870},{"style":1041},[3871],{"type":998,"value":1092},{"type":993,"tag":1026,"props":3873,"children":3874},{"class":1028,"line":136},[3875,3879,3883,3888],{"type":993,"tag":1026,"props":3876,"children":3877},{"style":1053},[3878],{"type":998,"value":1100},{"type":993,"tag":1026,"props":3880,"children":3881},{"style":1041},[3882],{"type":998,"value":1105},{"type":993,"tag":1026,"props":3884,"children":3885},{"style":1108},[3886],{"type":998,"value":3887},"\"Working age\"",{"type":993,"tag":1026,"props":3889,"children":3890},{"style":1041},[3891],{"type":998,"value":1116},{"type":993,"tag":1026,"props":3893,"children":3894},{"class":1028,"line":146},[3895],{"type":993,"tag":1026,"props":3896,"children":3897},{"emptyLinePlaceholder":13},[3898],{"type":998,"value":1064},{"type":993,"tag":1026,"props":3900,"children":3901},{"class":1028,"line":155},[3902],{"type":993,"tag":1026,"props":3903,"children":3904},{"style":1032},[3905],{"type":998,"value":3906},"# Membership testing\n",{"type":993,"tag":1026,"props":3908,"children":3909},{"class":1028,"line":164},[3910,3915,3919],{"type":993,"tag":1026,"props":3911,"children":3912},{"style":1041},[3913],{"type":998,"value":3914},"vowels ",{"type":993,"tag":1026,"props":3916,"children":3917},{"style":1047},[3918],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3920,"children":3921},{"style":1108},[3922],{"type":998,"value":3923}," \"aeiou\"\n",{"type":993,"tag":1026,"props":3925,"children":3926},{"class":1028,"line":173},[3927,3932,3936],{"type":993,"tag":1026,"props":3928,"children":3929},{"style":1041},[3930],{"type":998,"value":3931},"letter ",{"type":993,"tag":1026,"props":3933,"children":3934},{"style":1047},[3935],{"type":998,"value":1050},{"type":993,"tag":1026,"props":3937,"children":3938},{"style":1108},[3939],{"type":998,"value":3940}," \"a\"\n",{"type":993,"tag":1026,"props":3942,"children":3943},{"class":1028,"line":182},[3944,3948,3953,3958],{"type":993,"tag":1026,"props":3945,"children":3946},{"style":1047},[3947],{"type":998,"value":1072},{"type":993,"tag":1026,"props":3949,"children":3950},{"style":1041},[3951],{"type":998,"value":3952}," letter ",{"type":993,"tag":1026,"props":3954,"children":3955},{"style":1047},[3956],{"type":998,"value":3957},"in",{"type":993,"tag":1026,"props":3959,"children":3960},{"style":1041},[3961],{"type":998,"value":3962}," vowels:\n",{"type":993,"tag":1026,"props":3964,"children":3965},{"class":1028,"line":191},[3966,3970,3974,3978,3983,3987,3992,3996,4001],{"type":993,"tag":1026,"props":3967,"children":3968},{"style":1053},[3969],{"type":998,"value":1100},{"type":993,"tag":1026,"props":3971,"children":3972},{"style":1041},[3973],{"type":998,"value":1105},{"type":993,"tag":1026,"props":3975,"children":3976},{"style":1047},[3977],{"type":998,"value":1854},{"type":993,"tag":1026,"props":3979,"children":3980},{"style":1108},[3981],{"type":998,"value":3982},"\"'",{"type":993,"tag":1026,"props":3984,"children":3985},{"style":1053},[3986],{"type":998,"value":1864},{"type":993,"tag":1026,"props":3988,"children":3989},{"style":1041},[3990],{"type":998,"value":3991},"letter",{"type":993,"tag":1026,"props":3993,"children":3994},{"style":1053},[3995],{"type":998,"value":1874},{"type":993,"tag":1026,"props":3997,"children":3998},{"style":1108},[3999],{"type":998,"value":4000},"' is a vowel\"",{"type":993,"tag":1026,"props":4002,"children":4003},{"style":1041},[4004],{"type":998,"value":1116},{"type":993,"tag":1026,"props":4006,"children":4007},{"class":1028,"line":201},[4008],{"type":993,"tag":1026,"props":4009,"children":4010},{"emptyLinePlaceholder":13},[4011],{"type":998,"value":1064},{"type":993,"tag":1026,"props":4013,"children":4014},{"class":1028,"line":210},[4015],{"type":993,"tag":1026,"props":4016,"children":4017},{"style":1032},[4018],{"type":998,"value":4019},"# Multiple conditions with logical operators\n",{"type":993,"tag":1026,"props":4021,"children":4022},{"class":1028,"line":219},[4023,4027,4031],{"type":993,"tag":1026,"props":4024,"children":4025},{"style":1041},[4026],{"type":998,"value":1355},{"type":993,"tag":1026,"props":4028,"children":4029},{"style":1047},[4030],{"type":998,"value":1050},{"type":993,"tag":1026,"props":4032,"children":4033},{"style":1053},[4034],{"type":998,"value":4035}," 72\n",{"type":993,"tag":1026,"props":4037,"children":4038},{"class":1028,"line":228},[4039,4044,4048],{"type":993,"tag":1026,"props":4040,"children":4041},{"style":1041},[4042],{"type":998,"value":4043},"humidity ",{"type":993,"tag":1026,"props":4045,"children":4046},{"style":1047},[4047],{"type":998,"value":1050},{"type":993,"tag":1026,"props":4049,"children":4050},{"style":1053},[4051],{"type":998,"value":4052}," 40\n",{"type":993,"tag":1026,"props":4054,"children":4055},{"class":1028,"line":238},[4056,4060,4064,4068,4072,4077,4082,4086,4091],{"type":993,"tag":1026,"props":4057,"children":4058},{"style":1047},[4059],{"type":998,"value":1072},{"type":993,"tag":1026,"props":4061,"children":4062},{"style":1041},[4063],{"type":998,"value":1417},{"type":993,"tag":1026,"props":4065,"children":4066},{"style":1047},[4067],{"type":998,"value":1082},{"type":993,"tag":1026,"props":4069,"children":4070},{"style":1053},[4071],{"type":998,"value":1427},{"type":993,"tag":1026,"props":4073,"children":4074},{"style":1047},[4075],{"type":998,"value":4076}," and",{"type":993,"tag":1026,"props":4078,"children":4079},{"style":1041},[4080],{"type":998,"value":4081}," humidity ",{"type":993,"tag":1026,"props":4083,"children":4084},{"style":1047},[4085],{"type":998,"value":3862},{"type":993,"tag":1026,"props":4087,"children":4088},{"style":1053},[4089],{"type":998,"value":4090}," 50",{"type":993,"tag":1026,"props":4092,"children":4093},{"style":1041},[4094],{"type":998,"value":1092},{"type":993,"tag":1026,"props":4096,"children":4097},{"class":1028,"line":247},[4098,4102,4106,4111],{"type":993,"tag":1026,"props":4099,"children":4100},{"style":1053},[4101],{"type":998,"value":1100},{"type":993,"tag":1026,"props":4103,"children":4104},{"style":1041},[4105],{"type":998,"value":1105},{"type":993,"tag":1026,"props":4107,"children":4108},{"style":1108},[4109],{"type":998,"value":4110},"\"Perfect weather conditions!\"",{"type":993,"tag":1026,"props":4112,"children":4113},{"style":1041},[4114],{"type":998,"value":1116},{"type":993,"tag":1166,"props":4116,"children":4118},{"id":4117},"if-statement-best-practices",[4119],{"type":998,"value":4120},"✅ If Statement Best Practices",{"type":993,"tag":1001,"props":4122,"children":4123},{},[4124],{"type":998,"value":4125},"Following best practices helps you write clear, maintainable, and efficient conditional code.",{"type":993,"tag":1185,"props":4127,"children":4130},{"emoji":4128,"title":4129,"type":1550},"✅","If Statement Best Practices",[4131,4139,4162,4170,4203,4211,4234],{"type":993,"tag":1001,"props":4132,"children":4133},{},[4134],{"type":993,"tag":1195,"props":4135,"children":4136},{},[4137],{"type":998,"value":4138},"Code Quality:",{"type":993,"tag":1201,"props":4140,"children":4141},{},[4142,4147,4152,4157],{"type":993,"tag":1205,"props":4143,"children":4144},{},[4145],{"type":998,"value":4146},"Use descriptive condition names",{"type":993,"tag":1205,"props":4148,"children":4149},{},[4150],{"type":998,"value":4151},"Keep conditions simple and readable",{"type":993,"tag":1205,"props":4153,"children":4154},{},[4155],{"type":998,"value":4156},"Avoid deep nesting (use early returns)",{"type":993,"tag":1205,"props":4158,"children":4159},{},[4160],{"type":998,"value":4161},"Group related conditions logically",{"type":993,"tag":1001,"props":4163,"children":4164},{},[4165],{"type":993,"tag":1195,"props":4166,"children":4167},{},[4168],{"type":998,"value":4169},"Performance:",{"type":993,"tag":1201,"props":4171,"children":4172},{},[4173,4178,4193,4198],{"type":993,"tag":1205,"props":4174,"children":4175},{},[4176],{"type":998,"value":4177},"Order conditions by likelihood",{"type":993,"tag":1205,"props":4179,"children":4180},{},[4181,4183,4191],{"type":998,"value":4182},"Use ",{"type":993,"tag":1195,"props":4184,"children":4185},{},[4186],{"type":993,"tag":1313,"props":4187,"children":4188},{"href":160},[4189],{"type":998,"value":4190},"short-circuit evaluation",{"type":998,"value":4192}," effectively",{"type":993,"tag":1205,"props":4194,"children":4195},{},[4196],{"type":998,"value":4197},"Avoid redundant checks",{"type":993,"tag":1205,"props":4199,"children":4200},{},[4201],{"type":998,"value":4202},"Cache complex expressions in variables",{"type":993,"tag":1001,"props":4204,"children":4205},{},[4206],{"type":993,"tag":1195,"props":4207,"children":4208},{},[4209],{"type":998,"value":4210},"Maintainability:",{"type":993,"tag":1201,"props":4212,"children":4213},{},[4214,4219,4224,4229],{"type":993,"tag":1205,"props":4215,"children":4216},{},[4217],{"type":998,"value":4218},"Write self-documenting conditions",{"type":993,"tag":1205,"props":4220,"children":4221},{},[4222],{"type":998,"value":4223},"Use constants for magic numbers",{"type":993,"tag":1205,"props":4225,"children":4226},{},[4227],{"type":998,"value":4228},"Comment complex logic",{"type":993,"tag":1205,"props":4230,"children":4231},{},[4232],{"type":998,"value":4233},"Consider extracting to functions",{"type":993,"tag":1001,"props":4235,"children":4236},{},[4237,4242,4244,4249,4251,4256],{"type":993,"tag":1195,"props":4238,"children":4239},{},[4240],{"type":998,"value":4241},"Common Pitfalls:",{"type":998,"value":4243}," Single ",{"type":993,"tag":1022,"props":4245,"children":4247},{"className":4246},[],[4248],{"type":998,"value":1050},{"type":998,"value":4250}," (assignment) vs ",{"type":993,"tag":1022,"props":4252,"children":4254},{"className":4253},[],[4255],{"type":998,"value":1932},{"type":998,"value":4257}," (comparison)",{"type":993,"tag":1166,"props":4259,"children":4261},{"id":4260},"key-takeaways",[4262],{"type":998,"value":4263},"📚 Key Takeaways",{"type":993,"tag":1185,"props":4265,"children":4268},{"emoji":4266,"title":4267,"type":1189},"📚","If Statement Essentials",[4269,4277,4326,4334,4377],{"type":993,"tag":1001,"props":4270,"children":4271},{},[4272],{"type":993,"tag":1195,"props":4273,"children":4274},{},[4275],{"type":998,"value":4276},"Core Concepts:",{"type":993,"tag":1201,"props":4278,"children":4279},{},[4280,4297,4307,4317],{"type":993,"tag":1205,"props":4281,"children":4282},{},[4283,4288,4289,4295],{"type":993,"tag":1195,"props":4284,"children":4285},{},[4286],{"type":998,"value":4287},"Syntax",{"type":998,"value":2709},{"type":993,"tag":1022,"props":4290,"children":4292},{"className":4291},[],[4293],{"type":998,"value":4294},"if condition:",{"type":998,"value":4296}," followed by indented code",{"type":993,"tag":1205,"props":4298,"children":4299},{},[4300,4305],{"type":993,"tag":1195,"props":4301,"children":4302},{},[4303],{"type":998,"value":4304},"Boolean evaluation",{"type":998,"value":4306},": Conditions must be True or False",{"type":993,"tag":1205,"props":4308,"children":4309},{},[4310,4315],{"type":993,"tag":1195,"props":4311,"children":4312},{},[4313],{"type":998,"value":4314},"Code execution",{"type":998,"value":4316},": Only runs when condition is True",{"type":993,"tag":1205,"props":4318,"children":4319},{},[4320,4324],{"type":993,"tag":1195,"props":4321,"children":4322},{},[4323],{"type":998,"value":2272},{"type":998,"value":4325},": Defines code blocks in Python",{"type":993,"tag":1001,"props":4327,"children":4328},{},[4329],{"type":993,"tag":1195,"props":4330,"children":4331},{},[4332],{"type":998,"value":4333},"Important Details:",{"type":993,"tag":1201,"props":4335,"children":4336},{},[4337,4347,4357,4367],{"type":993,"tag":1205,"props":4338,"children":4339},{},[4340,4345],{"type":993,"tag":1195,"props":4341,"children":4342},{},[4343],{"type":998,"value":4344},"Colon required",{"type":998,"value":4346}," after condition",{"type":993,"tag":1205,"props":4348,"children":4349},{},[4350,4355],{"type":993,"tag":1195,"props":4351,"children":4352},{},[4353],{"type":998,"value":4354},"Indentation matters",{"type":998,"value":4356}," for code blocks",{"type":993,"tag":1205,"props":4358,"children":4359},{},[4360,4365],{"type":993,"tag":1195,"props":4361,"children":4362},{},[4363],{"type":998,"value":4364},"Any expression",{"type":998,"value":4366}," can be a condition",{"type":993,"tag":1205,"props":4368,"children":4369},{},[4370,4375],{"type":993,"tag":1195,"props":4371,"children":4372},{},[4373],{"type":998,"value":4374},"Truthiness rules",{"type":998,"value":4376}," apply to all data types",{"type":993,"tag":1001,"props":4378,"children":4379},{},[4380,4385,4387,4395],{"type":993,"tag":1195,"props":4381,"children":4382},{},[4383],{"type":998,"value":4384},"Next Steps:",{"type":998,"value":4386}," Learn about ",{"type":993,"tag":1195,"props":4388,"children":4389},{},[4390],{"type":993,"tag":1313,"props":4391,"children":4392},{"href":206},[4393],{"type":998,"value":4394},"multiple conditions",{"type":998,"value":4396}," with elif",{"type":993,"tag":1001,"props":4398,"children":4399},{},[4400],{"type":998,"value":4401},"If statements are the foundation of all decision making in Python. Once you master the basic syntax and understand how conditions work, you'll be ready to handle more complex scenarios with multiple conditions and advanced logic.",{"type":993,"tag":1166,"props":4403,"children":4405},{"id":4404},"test-your-knowledge",[4406],{"type":998,"value":4407},"Test Your Knowledge",{"type":993,"tag":1001,"props":4409,"children":4410},{},[4411],{"type":998,"value":4412},"Test what you've learned about if statements in Python:",{"type":993,"tag":4414,"props":4415,"children":4419},"redirect-button",{"icon":4416,"label":4417,"url":4418},"pi pi-send","Take Quiz","/tutorial-quiz/python/if-statements",[],{"type":993,"tag":1166,"props":4421,"children":4423},{"id":4422},"whats-next",[4424],{"type":998,"value":4425},"🚀 What's Next?",{"type":993,"tag":1001,"props":4427,"children":4428},{},[4429,4431,4438],{"type":998,"value":4430},"Now that you understand if statements, you're ready to handle more complex decision-making scenarios. The next lesson covers ",{"type":993,"tag":1195,"props":4432,"children":4433},{},[4434],{"type":993,"tag":1313,"props":4435,"children":4436},{"href":206},[4437],{"type":998,"value":207},{"type":998,"value":4439},", where you'll learn about elif statements and how to handle many different possibilities.",{"type":993,"tag":1001,"props":4441,"children":4442},{},[4443,4445,4452,4453,4461,4463,4471,4472,4480],{"type":998,"value":4444},"If statements work hand-in-hand with ",{"type":993,"tag":1195,"props":4446,"children":4447},{},[4448],{"type":993,"tag":1313,"props":4449,"children":4450},{"href":151},[4451],{"type":998,"value":1317},{"type":998,"value":1574},{"type":993,"tag":1195,"props":4454,"children":4455},{},[4456],{"type":993,"tag":1313,"props":4457,"children":4458},{"href":160},[4459],{"type":998,"value":4460},"logical operations",{"type":998,"value":4462},". They're also essential for ",{"type":993,"tag":1195,"props":4464,"children":4465},{},[4466],{"type":993,"tag":1313,"props":4467,"children":4468},{"href":234},[4469],{"type":998,"value":4470},"working with loops",{"type":998,"value":1574},{"type":993,"tag":1195,"props":4473,"children":4474},{},[4475],{"type":993,"tag":1313,"props":4476,"children":4477},{"href":617},[4478],{"type":998,"value":4479},"function development",{"type":998,"value":2935},{"type":993,"tag":1001,"props":4482,"children":4483},{},[4484,4486,4494,4495,4503,4505,4513],{"type":998,"value":4485},"Understanding if statements prepares you for ",{"type":993,"tag":1195,"props":4487,"children":4488},{},[4489],{"type":993,"tag":1313,"props":4490,"children":4491},{"href":790},[4492],{"type":998,"value":4493},"input validation",{"type":998,"value":2717},{"type":993,"tag":1195,"props":4496,"children":4497},{},[4498],{"type":993,"tag":1313,"props":4499,"children":4500},{"href":781},[4501],{"type":998,"value":4502},"error handling",{"type":998,"value":4504},", and ",{"type":993,"tag":1195,"props":4506,"children":4507},{},[4508],{"type":993,"tag":1313,"props":4509,"children":4510},{"href":215},[4511],{"type":998,"value":4512},"building interactive programs",{"type":998,"value":2935},{"type":993,"tag":4515,"props":4516,"children":4517},"style",{},[4518],{"type":998,"value":4519},"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":4521},[4522,4523,4524,4527,4528,4529,4530,4531,4532,4533],{"id":1168,"depth":27,"text":1171},{"id":1537,"depth":27,"text":1540},{"id":2000,"depth":27,"text":2003,"children":4525},[4526],{"id":2082,"depth":36,"text":2085},{"id":2277,"depth":27,"text":2280},{"id":2675,"depth":27,"text":2678},{"id":3449,"depth":27,"text":3452},{"id":4117,"depth":27,"text":4120},{"id":4260,"depth":27,"text":4263},{"id":4404,"depth":27,"text":4407},{"id":4422,"depth":27,"text":4425},1782373733386]