축하합니다

개발자를 위한 Python 중급

Jasmin Ludolf

Senior Data Science Content Developer

챕터 1 요약

  • 내장 함수:
    • print(), help(), type()
    • max(), min(), sum()
    • len(), round(), sorted()
  • 모듈:
    • string, os

$$

  • 패키지:
    • pandas
개발자를 위한 Python 중급

챕터 2 요약

# Create a custom function
def average(values):
    # Calculate the average
    average_value = sum(values) / len(values)

    # Round the results
    rounded_average = round(average_value, 2)

    # Return rounded_average as an output
    return rounded_average
개발자를 위한 Python 중급

챕터 2 요약

# Create a custom function
def average(values, rounded=False):

# Round average to two decimal places if rounded is True if rounded == True: average_value = sum(values) / len(values) rounded_average = round(average_value, 2) return rounded_average
# Otherwise, don't round else: average_value = sum(values) / len(values) return average_value
개발자를 위한 Python 중급

챕터 2 요약

def average(values):
    """
    Find the mean in a sequence of values and round to two decimal places.

    Args:
        values (list): A list of numeric values.

    Returns:
        rounded_average (float): The mean of values, rounded to two decimal places.
    """

average_value = sum(values) / len(values) rounded_average = round(average_value, 2) return rounded_average
개발자를 위한 Python 중급

챕터 2 요약

# Use arbitrary positional arguments
def average(*args):
    average_value = sum(args) / len(args)
    rounded_average = round(average_value, 2)
    return rounded_average

# Use arbitrary keyword arguments def average(**kwargs): average_value = sum(kwargs.values()) / len(kwargs.values()) rounded_average = round(average_value, 2) return rounded_average
개발자를 위한 Python 중급

챕터 3 요약

  • lambda arguments: expression
names = ["john", "sally", "leah"]

# Apply a lambda function inside map()
capitalize = map(lambda x: x.capitalize(), names)

# Convert to a list
print(list(capitalize))
['John', 'Sally', 'Leah']
개발자를 위한 Python 중급

챕터 3 요약

문자열 'Hello'를 float으로 변환할 수 없음을 나타내는 ValueError 출력

$$

  • try
  • except
  • raise
개발자를 위한 Python 중급

다음 단계

  • 추가 내장 함수:

    • zip()
    • input()
    • reduce()
    • filter()
  • 추가 패키지 및 모듈

    • time
    • venv
    • requests
    • fastapi

객체 지향 프로그래밍 입문

  • 대규모 소프트웨어 구축에 필수
개발자를 위한 Python 중급

축하합니다!

개발자를 위한 Python 중급

Preparing Video For Download...