Python Programming PP101 06 September 2024 18 15 26 Recording

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ก.ย. 2024
  • Session-03 covers
    Conditional statements
    if - Executes a block of code if a condition is true.
    if-else - Executes one block of code if a condition is true and another block if it is false.
    elif - Tests additional conditions if previous if or elif conditions are false.
    Loops
    for - Iterates over a sequence (like a list, tuple, or string) or range of numbers.
    while - Repeats a block of code as long as a condition is true.
    Conditional Loop statements
    continue - Skips the current iteration and proceeds to the next iteration of the loop.
    break - Exits the loop prematurely, regardless of the loop condition.
    String Operations
    Positive and Negative Indexing - Access characters in a string using positive (from the start) or negative (from the end) indices.
    Slicing - Extract a substring from a string using start, stop, and optional step values.
    editing - Strings are immutable in Python, so any modification creates a new string.
    finding - Locate the position of a substring within a string.
    String Length - Finding the length of the strings counting the characters present including space.
    You can Shift-L to toggle line numbers in Cell in Jupyter Notebook.

ความคิดเห็น •