ETF 초보 탈출기

  • Week 1-2 : Day 5, Day 6, and Day 7 of your Python learning journey:

    Day 5: Conditional Statements (if statements)

    • Conditional Logic:
    • Introduce the concept of conditional statements for decision-making in Python.
    • Explain how if, elif (else if), and else statements work.
    • Syntax:
    • Show the syntax for an if statement: if condition: # Code to execute if condition is True
    • Comparison Operators:
    • Introduce comparison operators used in conditions:
      • == (equal to), != (not equal to), < (less than), > (greater than), <= (less than or equal to), >= (greater than or equal to).
    • Examples:
    • Provide examples of simple if statements:
      python age = 20 if age >= 18: print("You are an adult.")

    Day 6: Loops (for and while loops)

    • For Loops:
    • Introduce for loops for iterating over sequences (e.g., lists, strings, range objects).
    • Explain the basic syntax: for item in sequence: # Code to execute for each item
    • While Loops:
    • Introduce while loops for repeated execution based on a condition.
    • Explain the basic syntax: while condition: # Code to execute while condition is True
    • Examples:
    • Provide examples of for and while loops: # Example of a for loop numbers = [1, 2, 3, 4, 5] for num in numbers: print(num) # Example of a while loop count = 0 while count < 5: print(count) count += 1

    Day 7: Basic Input and Output

    • Input from the User:
    • Introduce the input() function for getting user input.
    • Explain how to use input() to store user input in a variable. name = input("Enter your name: ")
    • Output to the Console:
    • Discuss the print() function for displaying output to the console.
    • Show how to format and combine output using print(). print("Hello, " + name + "!")
    • Formatting Output:
    • Introduce basic string formatting techniques (e.g., f-strings): age = 25 print(f"You are {age} years old.")
    • Practice Exercises:
    • Provide exercises that involve conditional statements, loops, user input, and output to practice the concepts learned.

    By the end of Day 7, you should have a solid grasp of control flow in Python, including conditional statements (if, elif, else), loops (for and while), and basic input/output operations. These concepts are fundamental for creating more complex programs and applications in Python.

  • Week 1-2 : Day 3 and Day 4 of your Python learning journey:

    Day 3: Variables and Data Types

    • Variables:
    • Understand the concept of variables as containers for storing data.
    • Learn how to assign values to variables using the assignment operator =.
    • Data Types:
    • Introduce fundamental data types in Python:
      • Integer (int): Whole numbers, e.g., 5, -10.
      • Float (float): Numbers with decimal points, e.g., 3.14, -0.5.
      • String (str): Sequences of characters enclosed in single or double quotes, e.g., “Hello, Python!”.
      • Boolean (bool): Represents either True or False.
    • Variable Naming Rules:
    • Explain the rules for naming variables:
      • Variable names must start with a letter (a-z, A-Z) or an underscore (_).
      • Subsequent characters can include letters, numbers, and underscores.
      • Variable names are case-sensitive (e.g., myVar and myvar are different).
    • Assigning Values:
    • Demonstrate how to assign values to variables:
    python my_integer = 5 my_float = 3.14 my_string = "Hello, Python!" is_true = True

    Day 4: Basic Operations with Data Types

    • Arithmetic Operations:
    • Introduce basic arithmetic operations:
      • Addition (+), subtraction (-), multiplication (*), division (/), and exponentiation (**).
    • Show how to perform these operations with integers and floats.
    • String Operations:
    • Explain string concatenation using the + operator:
      greeting = "Hello" name = "Alice" message = greeting + ", " + name + "!"
    • Type Conversion:
    • Discuss type conversion between data types (casting):
      • int(), float(), and str() functions.
      • Example: int("5") converts the string “5” to an integer.
    • String Methods:
    • Introduce some basic string methods:
      • len(): Returns the length of a string.
      • upper(): Converts a string to uppercase.
      • lower(): Converts a string to lowercase.
      • Example: len("Python"), "Hello".upper(), "WORLD".lower().
    • Boolean Operations:
    • Cover basic boolean operations:
      • and, or, and not.
      • Example: True and False, True or False, not True.
    • Practice Exercises:
    • Provide exercises for students to practice using variables and performing operations with data types.

    By the end of Day 4, you should have a solid understanding of variables and the basic data types in Python. You’ll also be comfortable performing basic operations on these data types, which is essential for programming in Python.