Search
- Filter Results
- Location
- Classification
- Include attachments
- https://eng.libretexts.org/Bookshelves/Computer_Science/Programming_Languages/Python_Programming_(OpenStax)/08%3A__Strings/8.04%3A_String_FormattingThis page provides an overview of string formatting in Python, focusing on the `format()` method for generating formatted strings. It explores template usage with replacement fields, named and numbere...This page provides an overview of string formatting in Python, focusing on the `format()` method for generating formatted strings. It explores template usage with replacement fields, named and numbered arguments, and techniques for aligning outputs. The text includes practical examples for creating personalized messages, formatting tables, and managing numerical formatting with precision and width. It concludes with exercises and challenges to reinforce understanding of the concepts discussed.
- https://eng.libretexts.org/Bookshelves/Computer_Science/Programming_Languages/Python_Programming_(OpenStax)/09%3A_Lists/9.03%3A_Common_List_OperationsThis page covers key list operations in Python, detailing the use of built-in functions such as max(), min(), and sum() for finding the largest, smallest, and total values in a list. It explains list ...This page covers key list operations in Python, detailing the use of built-in functions such as max(), min(), and sum() for finding the largest, smallest, and total values in a list. It explains list copying with the copy() method and the effects of modifying original versus copied lists. The section also includes practice questions to enhance comprehension of these concepts.
- https://eng.libretexts.org/Bookshelves/Computer_Science/Programming_Languages/Python_Programming_(OpenStax)/08%3A__Strings/8.01%3A_String_OperationsThis page outlines learning objectives for string manipulation in Python, including the use of logical and membership operators for string comparison. It introduces string methods such as lower() and ...This page outlines learning objectives for string manipulation in Python, including the use of logical and membership operators for string comparison. It introduces string methods such as lower() and upper() for case conversion and includes examples and practical exercises for application. Overall, it provides foundational knowledge of string operations in Python.
- https://eng.libretexts.org/Bookshelves/Computer_Science/Programming_Languages/Python_Programming_(OpenStax)/04%3A__Decisions/4.06%3A_Nested_DecisionsThis page explains nested if-else statements in programming, showcasing an example of validating game IDs and player counts. It emphasizes improving code clarity and efficiency through nesting. The te...This page explains nested if-else statements in programming, showcasing an example of validating game IDs and player counts. It emphasizes improving code clarity and efficiency through nesting. The text also includes practice scenarios for decision-making, such as identifying poisonous plants and meal orders, promoting the implementation and understanding of nested if-else structures in various contexts.
- https://eng.libretexts.org/Bookshelves/Computer_Science/Programming_Languages/Python_Programming_(OpenStax)/05%3A_Loops/5.02%3A_For_LoopThis page explains the for loop construct in Python, highlighting its use for iterating over containers like ranges, strings, and lists. It covers the range() function for sequence generation and incl...This page explains the for loop construct in Python, highlighting its use for iterating over containers like ranges, strings, and lists. It covers the range() function for sequence generation and includes practical examples and exercises. Users can practice tasks like counting characters and printing number sequences while assessing their understanding through checkpoints. Specific programming exercises, such as counting spaces in a string and identifying even and odd numbers, reinforce skills.
- https://eng.libretexts.org/Bookshelves/Computer_Science/Programming_Languages/Python_Programming_(OpenStax)/08%3A__Strings/8.02%3A_String_SlicingThis page covers string manipulation techniques in programming, emphasizing string indexing, slicing, and the concept of immutability. It explains how to access characters and substrings through both ...This page covers string manipulation techniques in programming, emphasizing string indexing, slicing, and the concept of immutability. It explains how to access characters and substrings through both positive and negative indexing. The text notes that strings cannot be modified directly, necessitating the creation of new string objects for any changes. Additionally, it includes examples and practice questions to enhance understanding of string handling.