축하합니다!

개발자를 위한 Python 입문

Jasmin Ludolf

Senior Data Science Content Developer

챕터 1 요약

# Define quantity
quantity = 10

# Single quotes ingredient_name = 'pasta'
# Double quotes also work ingredient_name = "pasta"
개발자를 위한 Python 입문

챕터 2 요약

ingredient_name = "Basil Leaves"


# Convert to lowercase ingredient_name = ingredient_name.lower()
# List of ingredients
ingredients = ["pasta", "tomatoes", "garlic",
               "basil", "olive oil", "salt"]

# Get the value at the first index ingredients[0]
# Creating a dictionary
recipe_dict = {"pasta": 500,
               "tomatoes": 400, 
               "garlic": 15,
               "basil": 20, 
               "olive oil": 30,
               "salt": 5}
# Create a set
ingredients_set = {"pasta", "tomatoes", "pasta", 
                   "basil", "garlic", "olive oil",
                   "salt"}

# Create a tuple serving_sizes = (1, 2, 4, 6, 8)
개발자를 위한 Python 입문

챕터 3 요약

연산자 기능
== 같음
!= 같지 않음
> 보다 많음
>= 크거나 같음
< 미만
<= 작거나 같음
키워드 기능 사용
if 조건이 충족되는 경우 워크플로에서 먼저
elif 그렇지 않으면 조건이 충족되는지 확인 if 이후
else 그렇지 않으면 이 작업 수행 elif 이후
개발자를 위한 Python 입문

챕터 3 요약

# Ingredients list
ingredients = ["pasta", "tomatoes", "garlic", "basil", "olive oil", "salt"]


# Loop through and print each ingredient for ingredient in ingredients:
print(ingredient)
pasta
tomatoes
garlic
basil
olive oil
salt
개발자를 위한 Python 입문

챕터 3 요약

ingredients_to_add = 5
items_added = 0

while items_added < ingredients_to_add:
    items_added += 1
    remaining = ingredients_to_add - items_added

    if remaining > 3:
        print("Several ingredients remaining")
    elif remaining >= 1:
        print("Almost done!")
    else:
        print("Shopping list complete!")
개발자를 위한 Python 입문

챕터 3 요약

키워드 기능
and 여러 조건이 True인지 평가
or 하나 이상의 조건이 True인지 평가
in 값이 데이터 구조에 있는지 평가
not 데이터 구조에 값이 없는지 평가
  • list.append()
개발자를 위한 Python 입문

다음 단계

  • 추가 내장형 함수

    • zip()
    • enumerate()
  • 패키지 및 모듈

    • os
    • time
    • venv
    • pandas
    • requests
    • numpy
  • 맞춤형 함수 빌드하기

$$

  • DataCamp의 개발자를 위한 중급 Python
개발자를 위한 Python 입문

축하합니다!

개발자를 위한 Python 입문

Preparing Video For Download...