Skip to content

30 Days Of Python: Day 2 - λ³€μˆ˜, λ‚΄μž₯ ν•¨μˆ˜

Twitter Follow Author: Asabeneh Yetayeh
Second Edition: July, 2021

<< Day 1 | Day 3 >>

30DaysOfPython

πŸ“˜ Day 2

λ‚΄μž₯ ν•¨μˆ˜

νŒŒμ΄μ¬μ—λŠ” μˆ˜λ§Žμ€ λ‚΄μž₯ ν•¨μˆ˜κ°€ μžˆμŠ΅λ‹ˆλ‹€. λ‚΄μž₯ ν•¨μˆ˜λŠ” μ „μ—­μ—μ„œ μ‚¬μš© κ°€λŠ₯ν•˜κ³  그건 importing μ΄λ‚˜ configuring없이 λ‚΄μž₯ ν•¨μˆ˜λ₯Ό μ‚¬μš© κ°€λŠ₯ν•˜λ‹€λŠ” λœ»μž…λ‹ˆλ‹€. λ‹€μŒμ€ κ°€μž₯ 자주 μ‚¬μš©λ˜λŠ” 파이썬 λ‚΄μž₯ν•¨μˆ˜λ“€ 쀑 λͺ‡κ°€μ§€μž…λ‹ˆλ‹€: print(), len(), type(), int(), float(), str(), input(), list(), dict(), min(), max(), sum(), sorted(), open(), file(), help(), and dir(). λ°‘μ˜ ν‘œμ—μ„œ 파이썬 κ³΅μ‹λ¬Έμ„œ 에 쓰여진 파이썬 λ‚΄μž₯ ν•¨μˆ˜μ˜ 전체 λͺ©λ‘μ„ λ³Ό 수 μžˆμŠ΅λ‹ˆλ‹€.

Built-in Functions

파이썬 μ‰˜μ„ μ—΄κ³  κ°€μž₯ 자주 μ‚¬μš©λ˜λŠ” λ‚΄μž₯ ν•¨μˆ˜λ₯Ό μ‚¬μš©ν•΄λ΄…μ‹œλ‹€.

Built-in functions

λ‹€λ₯Έ λ‚΄μž₯ ν•¨μˆ˜λ₯Ό μ‚¬μš©ν•΄ 더 μ—°μŠ΅ν•΄λ΄…μ‹œλ‹€.

Help and Dir Built in Functions

μœ„μ˜ ν„°λ―Έλ„μ—μ„œ λ³Ό 수 μžˆλ“―μ΄, νŒŒμ΄μ¬μ—λŠ” reserved wordκ°€ μžˆμŠ΅λ‹ˆλ‹€. reserved wordλŠ” λ³€μˆ˜λ‚˜ ν•¨μˆ˜λ₯Ό μ„ μ–Έν• λ•Œ μ‚¬μš©λ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. λ³€μˆ˜μ— κ΄€ν•΄μ„œλŠ” λ‹€μŒ μž₯μ—μ„œ λ‹€λ£°κ²ƒμž…λ‹ˆλ‹€.

이제 당신은 λ‚΄μž₯ ν•¨μˆ˜μ— μ΅μˆ™ν•΄μ‘Œμ„ 것이라 λ―ΏμŠ΅λ‹ˆλ‹€. ν•œλ²ˆ 더 λ‚΄μž₯ ν•¨μˆ˜μ˜ μ—°μŠ΅μ„ ν•˜κ³  λ‹€μŒ μž₯으둜 λ„˜μ–΄κ°‘μ‹œλ‹€. Min Max Sum

λ³€μˆ˜

λ³€μˆ˜λŠ” 컴퓨터 λ©”λͺ¨λ¦¬μ— 정보λ₯Ό μ €μž₯ν•©λ‹ˆλ‹€. Mnemonic λ³€μˆ˜λŠ” λ§Žμ€ ν”„λ‘œκ·Έλž˜λ° μ–Έμ–΄μ—μ„œ μ‚¬μš©ν•˜λ„λ‘ ꢌμž₯λ©λ‹ˆλ‹€. Mnemonic λ³€μˆ˜λŠ” μ‰½κ²Œ κΈ°μ–΅ν•˜κ³  연관지을 수 μžˆλŠ” λ³€μˆ˜ μ΄λ¦„μž…λ‹ˆλ‹€. ν•œ λ³€μˆ˜λŠ” 정보가 μ €μž₯λ˜μ–΄μžˆλŠ” λ©”λͺ¨λ¦¬ μ£Όμ†Œλ₯Ό μ°Έμ‘°ν•©λ‹ˆλ‹€. λ³€μˆ˜ 이름을 지정할 λ•ŒλŠ” μ‹œμž‘ λΆ€λΆ„μ˜ 숫자, 특수 문자, ν•˜μ΄ν”ˆμ„ μ‚¬μš©ν•  수 μ—†μŠ΅λ‹ˆλ‹€. λ³€μˆ˜λŠ” 짧은 이름(예: x, y, z)을 κ°€μ§ˆ 수 μžˆμ§€λ§Œ 더 λ³€μˆ˜μ— λŒ€ν•œ μ„€λͺ…을 담은 이름(이름, μ„±, λ‚˜μ΄, κ΅­κ°€)을 μ‚¬μš©ν•˜λŠ” 것을 μΆ”μ²œν•©λ‹ˆλ‹€.

파이썬 λ³€μˆ˜ 이름 κ·œμΉ™

  • λ³€μˆ˜ 이름은 문자 λ˜λŠ” 밑쀄 문자둜 μ‹œμž‘ν•΄μ•Ό ν•©λ‹ˆλ‹€
  • λ³€μˆ˜ 이름은 숫자둜 μ‹œμž‘ν•  수 μ—†μŠ΅λ‹ˆλ‹€
  • λ³€μˆ˜ μ΄λ¦„μ—λŠ” μ•ŒνŒŒλ²³κ³Ό μˆ«μžμ™€ 밑쀄(A-z, 0-9 및 _)만 μ‚¬μš©ν•  수 μžˆμŠ΅λ‹ˆλ‹€
  • λ³€μˆ˜ 이름은 λŒ€μ†Œλ¬Έμžλ₯Ό κ΅¬λΆ„ν•©λ‹ˆλ‹€(firstname, Firstname, FirstName, FIRSTNAME은 μ„œλ‘œ λ‹€λ₯Έ λ³€μˆ˜)

μ‚¬μš©κ°€λŠ₯ν•œ λ³€μˆ˜ 이름듀을 μ‚΄νŽ΄λ΄…μ‹œλ‹€

firstname
lastname
age
country
city
first_name
last_name
capital_city
_if # reserved wordλ₯Ό λ³€μˆ˜ μ΄λ¦„μœΌλ‘œ μ‚¬μš©ν•˜κ³  싢은 경우
year_2021
year2021
current_year_2021
birth_year
num1
num2

μ‚¬μš©ν•  수 μ—†λŠ” λ³€μˆ˜ 이름듀

first-name
first@name
first$name
num-1
1num

μš°λ¦¬λŠ” λ§Žμ€ 파이썬 κ°œλ°œμžλ“€μ΄ μ±„νƒν•œ ν‘œμ€€ 파이썬 λ³€μˆ˜ λͺ…λͺ… 방식을 μ‚¬μš©ν•  κ²ƒμž…λ‹ˆλ‹€. 파이썬 κ°œλ°œμžλ“€μ€ μŠ€λ„€μ΄ν¬ μΌ€μ΄μŠ€(snake_case) λ³€μˆ˜ λͺ…λͺ… κ·œμΉ™μ„ μ‚¬μš©ν•©λ‹ˆλ‹€. μš°λ¦¬λŠ” 두 개 μ΄μƒμ˜ 단어λ₯Ό ν¬ν•¨ν•˜λŠ” λ³€μˆ˜μ— λŒ€ν•΄ 각 단어 뒀에 밑쀄 문자λ₯Ό μ‚¬μš©ν•©λ‹ˆλ‹€(예: first_name, last_name, engine_rotation_speed). μ•„λž˜ μ˜ˆμ œλŠ” λ³€μˆ˜μ˜ ν‘œμ€€ λͺ…λͺ… 예제이며, λ³€μˆ˜ 이름이 λ‘˜ μ΄μƒμ˜ 단어일 경우 밑쀄이 ν•„μš”ν•©λ‹ˆλ‹€.

λ³€μˆ˜μ— νŠΉμ • 데이터 μœ ν˜•μ„ ν• λ‹Ήν•  λ•Œ 이λ₯Ό λ³€μˆ˜ 선언이라고 ν•©λ‹ˆλ‹€. 예λ₯Ό λ“€μ–΄ μ•„λž˜ μ˜ˆμ œμ—μ„œ λ‚΄ 이름은 first_name λ³€μˆ˜μ— ν• λ‹Ήλ©λ‹ˆλ‹€. λ“±ν˜Έ κΈ°ν˜ΈλŠ” ν• λ‹Ή μ—°μ‚°μžμž…λ‹ˆλ‹€. 할당은 λ³€μˆ˜μ— 데이터λ₯Ό μ €μž₯ν•˜λŠ” 것을 μ˜λ―Έν•©λ‹ˆλ‹€. νŒŒμ΄μ¬μ—μ„œ λ“±ν˜Έ κΈ°ν˜ΈλŠ” μˆ˜ν•™μ—μ„œμ˜ λ“±ν˜Έκ°€ μ•„λ‹™λ‹ˆλ‹€.

Example:

# Variables in Python
first_name = 'Asabeneh'
last_name = 'Yetayeh'
country = 'Finland'
city = 'Helsinki'
age = 250
is_married = True
skills = ['HTML', 'CSS', 'JS', 'React', 'Python']
person_info = {
   'firstname':'Asabeneh',
   'lastname':'Yetayeh',
   'country':'Finland',
   'city':'Helsinki'
   }

λ‚΄μž₯ ν•¨μˆ˜μΈ print() 와 len() 을 μ‚¬μš©ν•΄λ΄…μ‹œλ‹€. Print ν•¨μˆ˜λŠ” 인자의 μˆ˜μ— μ œν•œμ΄ μ—†μŠ΅λ‹ˆλ‹€. μΈμžλŠ” ν•¨μˆ˜ κ΄„ν˜Έ μ•ˆμ— λ„£μ–΄ 전달할 수 μžˆλŠ” κ°’μž…λ‹ˆλ‹€. μ•„λž˜ 예제λ₯Ό λ΄…μ‹œλ‹€.

Example:

print('Hello, World!') # Hello, World! λΌλŠ” 글이 ν•˜λ‚˜μ˜ μΈμžμž…λ‹ˆλ‹€
print('Hello',',', 'World','!') # μ—¬λŸ¬κ°œμ˜ 인자λ₯Ό 받을 수 μžˆμŠ΅λ‹ˆλ‹€, λ„€κ°œμ˜ μΈμžκ°€ λ„˜κ²¨μ‘ŒμŠ΅λ‹ˆλ‹€ 
print(len('Hello, World!')) # ν•˜λ‚˜μ˜ μΈμžλ§Œμ„ λ°›μŠ΅λ‹ˆλ‹€

μœ„μ—μ„œ μ •μ˜λœ λ³€μˆ˜λ“€μ„ 찍어보고 길이λ₯Ό μ°Ύμ•„λ΄…μ‹œλ‹€:

Example:

# λ³€μˆ˜μ— μ €μž₯된 κ°’ 찍기

print('First name:', first_name)
print('First name length:', len(first_name))
print('Last name: ', last_name)
print('Last name length: ', len(last_name))
print('Country: ', country)
print('City: ', city)
print('Age: ', age)
print('Married: ', is_married)
print('Skills: ', skills)
print('Person information: ', person_info)

ν•œ μ€„λ‘œ μ—¬λŸ¬κ°œμ˜ λ³€μˆ˜ μ„ μ–Έ

ν•˜λ‚˜μ˜ μ€„μ—μ„œ μ—¬λŸ¬κ°œμ˜ λ³€μˆ˜λ₯Ό μ„ μ–Έν•  μˆ˜λ„ μžˆμŠ΅λ‹ˆλ‹€:

Example:

first_name, last_name, country, age, is_married = 'Asabeneh', 'Yetayeh', 'Helsink', 250, True

print(first_name, last_name, country, age, is_married)
print('First name:', first_name)
print('Last name: ', last_name)
print('Country: ', country)
print('Age: ', age)
print('Married: ', is_married)

λ‚΄μž₯ ν•¨μˆ˜ input() 을 μ‚¬μš©ν•΄ μ‚¬μš©μžμ˜ μž…λ ₯ λ°›κΈ°. μ‚¬μš©μžλ‘œλΆ€ν„° 받은 정보λ₯Ό first_nameκ³Ό age λ³€μˆ˜μ— ν• λ‹Ήν•΄λ΄…μ‹œλ‹€. Example:

first_name = input('What is your name: ')
age = input('How old are you? ')

print(first_name)
print(age)

μžλ£Œν˜•

νŒŒμ΄μ¬μ—λŠ” λͺ‡ 가지 μžλ£Œν˜•μ΄ μžˆμŠ΅λ‹ˆλ‹€. μžλ£Œν˜•μ„ μ‹λ³„ν•˜κΈ° μœ„ν•΄ λ‚΄μž₯ ν•¨μˆ˜ type() 을 μ‚¬μš©ν•©λ‹ˆλ‹€. μ„œλ‘œ λ‹€λ₯Έ μžλ£Œν˜•μ„ 잘 μ΄ν•΄ν•˜λŠ” 데 집쀑해 μ£Όμ‹œκΈ°λ₯Ό λΆ€νƒλ“œλ¦½λ‹ˆλ‹€. ν”„λ‘œκ·Έλž˜λ°μ—μ„œ λͺ¨λ“ κ²ƒμ€ μžλ£Œν˜•κ³Ό 관련이 μžˆμŠ΅λ‹ˆλ‹€. μ²˜μŒμ— μžλ£Œν˜•μ„ μ†Œκ°œν–ˆμ§€λ§Œ λͺ¨λ“  μ£Όμ œκ°€ μžλ£Œν˜•κ³Ό 관련이 있기 λ•Œλ¬Έμ— λ‹€μ‹œ λ‚˜μ˜΅λ‹ˆλ‹€. μžλ£Œν˜•μ— λŒ€ν•΄μ„œλŠ” 각 μ„Ήμ…˜μ—μ„œ μžμ„Ένžˆ μ„€λͺ…ν•˜κ² μŠ΅λ‹ˆλ‹€.

μžλ£Œν˜• 확인 및 ν˜•λ³€ν™˜

  • μžλ£Œν˜• 확인: νŠΉμ • 정보/λ³€μˆ˜μ˜ μžλ£Œν˜•μ„ ν™•μΈν•˜κΈ°μœ„ν•΄ μš°λ¦¬λŠ” type() 을 μ‚¬μš©ν•©λ‹ˆλ‹€ Example:
# λ‹€μ–‘ν•œ 파이썬 μžλ£Œν˜•
# λ‹€μ–‘ν•œ μžλ£Œν˜•μ˜ λ³€μˆ˜λ“€μ„ μ„ μ–Έν•΄ λ΄…μ‹œλ‹€.

first_name = 'Asabeneh'     # str
last_name = 'Yetayeh'       # str
country = 'Finland'         # str
city= 'Helsinki'            # str
age = 250                   # int, 제 μ‹€μ œ λ‚˜μ΄κ°€ μ•„λ‹™λ‹ˆλ‹€, κ±±μ •λ§ˆμ„Έμš”

# Printing out types
print(type('Asabeneh'))     # str
print(type(first_name))     # str
print(type(10))             # int
print(type(3.14))           # float
print(type(1 + 1j))         # complex
print(type(True))           # bool
print(type([1, 2, 3, 4]))     # list
print(type({'name':'Asabeneh','age':250, 'is_married':250}))    # dict
print(type((1,2)))                                              # tuple
print(type(zip([1,2],[3,4])))                                   # set
  • ν˜•λ³€ν™˜: ν•˜λ‚˜μ˜ μžλ£Œν˜•μ„ λ‹€λ₯Έ μžλ£Œν˜•μœΌλ‘œ λ³€ν™˜ν•©λ‹ˆλ‹€. int(), float(), str(), list, set λ₯Ό μ‚¬μš©ν•©λ‹ˆλ‹€. μ‚°μˆ  연산을 μˆ˜ν–‰ν•  λ•Œ λ¬Έμžμ—΄ μˆ«μžλ“€μ„ λ¨Όμ € int λ‚˜ float둜 λ³€ν™˜ν•΄μ•Ό ν•©λ‹ˆλ‹€. 그렇지 μ•ŠμœΌλ©΄ 였λ₯˜κ°€ λ°˜ν™˜λ©λ‹ˆλ‹€. λ§Œμ•½ 숫자λ₯Ό λ¬Έμžμ—΄κ³Ό κ²°ν•©ν•œλ‹€λ©΄, κ·Έ μˆ«μžλŠ” λ¨Όμ € λ¬Έμžμ—΄λ‘œ λ³€ν™˜λ˜μ–΄μ•Ό ν•©λ‹ˆλ‹€. 결합에 λŒ€ν•΄μ„œλŠ” String μ„Ήμ…˜μ—μ„œ μ„€λͺ…ν•˜κ² μŠ΅λ‹ˆλ‹€.

Example:

# int to float
num_int = 10
print('num_int',num_int)         # 10
num_float = float(num_int)
print('num_float:', num_float)   # 10.0

# float to int
gravity = 9.81
print(int(gravity))             # 9

# int to str
num_int = 10
print(num_int)                  # 10
num_str = str(num_int)
print(num_str)                  # '10'

# str to int or float
num_str = '10.6'
print('num_int', int(num_str))      # 10
print('num_float', float(num_str))  # 10.6

# str to list
first_name = 'Asabeneh'
print(first_name)               # 'Asabeneh'
first_name_to_list = list(first_name)
print(first_name_to_list)            # ['A', 's', 'a', 'b', 'e', 'n', 'e', 'h']

숫자

파이썬의 숫자 μžλ£Œν˜•:

  1. Integers: μ •μˆ˜(음수, 0 , μ–‘μˆ˜) 예: ... -3, -2, -1, 0, 1, 2, 3 ...

  2. 뢀동 μ†Œμˆ˜μ  숫자(10μ§„μˆ˜) 예: ... -3.5, -2.25, -1.0, 0.0, 1.1, 2.2, 3.5 ...

  3. λ³΅μ†Œμˆ˜ 예: 1 + j, 2 + 4j, 1 - 1j

πŸŒ• 당신은 정말 λ©‹μ§‘λ‹ˆλ‹€. μ—¬λŸ¬λΆ„μ€ 이제 막 2일차 도전을 마쳀고 μœ„λŒ€ν•¨μœΌλ‘œ κ°€λŠ” 길에 두 걸음 μ•žμ„œ μžˆμŠ΅λ‹ˆλ‹€. 이제 μ—¬λŸ¬λΆ„μ˜ λ‡Œμ™€ κ·Όμœ‘μ„ μœ„ν•œ μš΄λ™μ„ ν•˜μ„Έμš”.

πŸ’» Exercises - Day 2

Exercises: Level 1

  1. 30DaysOfPython 내에 day_2λΌλŠ” 폴더λ₯Ό μƒμ„±ν•˜μ„Έμš”. κ·Έ 폴더 내에 variables.py λΌλŠ” νŒŒμΌμ„ μƒμ„±ν•˜μ„Έμš”.
  2. 'Day 2: 30 Days of python programming'μ΄λΌλŠ” 파이썬 주석을 μž‘μ„±ν•©λ‹ˆλ‹€.
  3. first name λ³€μˆ˜λ₯Ό μ„ μ–Έν•˜κ³  λ³€μˆ˜μ— 값을 ν• λ‹Ήν•©λ‹ˆλ‹€.
  4. last name λ³€μˆ˜λ₯Ό μ„ μ–Έν•˜κ³  λ³€μˆ˜μ— 값을 ν• λ‹Ήν•©λ‹ˆλ‹€.
  5. full name λ³€μˆ˜λ₯Ό μ„ μ–Έν•˜κ³  λ³€μˆ˜μ— 값을 ν• λ‹Ήν•©λ‹ˆλ‹€.
  6. country λ³€μˆ˜λ₯Ό μ„ μ–Έν•˜κ³  값을 ν• λ‹Ήν•©λ‹ˆλ‹€.
  7. city λ³€μˆ˜λ₯Ό μ„ μ–Έν•˜κ³  값을 ν• λ‹Ήν•©λ‹ˆλ‹€.
  8. age λ³€μˆ˜λ₯Ό μ„ μ–Έν•˜κ³  값을 ν• λ‹Ήν•©λ‹ˆλ‹€.
  9. year λ³€μˆ˜λ₯Ό μ„ μ–Έν•˜κ³  값을 ν• λ‹Ήν•©λ‹ˆλ‹€.
  10. is_married λ³€μˆ˜λ₯Ό μ„ μ–Έν•˜κ³  값을 ν• λ‹Ήν•©λ‹ˆλ‹€.
  11. is_true λ³€μˆ˜λ₯Ό μ„ μ–Έν•˜κ³  값을 ν• λ‹Ήν•©λ‹ˆλ‹€.
  12. is_light_on λ³€μˆ˜λ₯Ό μ„ μ–Έν•˜κ³  값을 ν• λ‹Ήν•©λ‹ˆλ‹€.
  13. ν•œ 쀄에 μ—¬λŸ¬κ°œμ˜ λ³€μˆ˜λ₯Ό μ„ μ–Έν•©λ‹ˆλ‹€.

Exercises: Level 2

  1. Check the data type of all your variables using type() built-in function
  2. Using the len() built-in function, find the length of your first name
  3. Compare the length of your first name and your last name
  4. Declare 5 as num_one and 4 as num_two
    1. Add num_one and num_two and assign the value to a variable total
    2. Subtract num_two from num_one and assign the value to a variable diff
    3. Multiply num_two and num_one and assign the value to a variable product
    4. Divide num_one by num_two and assign the value to a variable division
    5. Use modulus division to find num_two divided by num_one and assign the value to a variable remainder
    6. Calculate num_one to the power of num_two and assign the value to a variable exp
    7. Find floor division of num_one by num_two and assign the value to a variable floor_division
  5. The radius of a circle is 30 meters.
    1. Calculate the area of a circle and assign the value to a variable name of area_of_circle
    2. Calculate the circumference of a circle and assign the value to a variable name of circum_of_circle
    3. Take radius as user input and calculate the area.
  6. Use the built-in input function to get first name, last name, country and age from a user and store the value to their corresponding variable names
  7. Run help('keywords') in Python shell or in your file to check for the Python reserved words or keywords

  8. type() λ‚΄μž₯ ν•¨μˆ˜λ₯Ό μ‚¬μš©ν•˜μ—¬ λͺ¨λ“  λ³€μˆ˜μ˜ μžλ£Œν˜•μ„ ν™•μΈν•©λ‹ˆλ‹€.

  9. len() λ‚΄μž₯ ν•¨μˆ˜λ₯Ό μ‚¬μš©ν•˜μ—¬ λ‹Ήμ‹ μ˜ first name 의 길이λ₯Ό μ°ΎμŠ΅λ‹ˆλ‹€.
  10. λ‹Ήμ‹ μ˜ first name κ³Ό last name 의 길이λ₯Ό λΉ„κ΅ν•©λ‹ˆλ‹€.
  11. 5λ₯Ό num_1둜, 4λ₯Ό num_2둜 μ„ μ–Έν•©λ‹ˆλ‹€.
    1. num_oneκ³Ό num_twoλ₯Ό λ”ν•˜κ³  κ·Έ 값을 λ³€μˆ˜ total 에 ν• λ‹Ήν•©λ‹ˆλ‹€.
    2. num_1μ—μ„œ num_2λ₯Ό λΉΌκ³  κ·Έ 값을 λ³€μˆ˜ diff 에 ν• λ‹Ήν•©λ‹ˆλ‹€.
    3. num_two와 num_one을 κ³±ν•˜μ—¬ κ·Έ 값을 λ³€μˆ˜ product 에 ν• λ‹Ήν•©λ‹ˆλ‹€.
    4. num_one을 num_two둜 λ‚˜λˆ„κ³  κ·Έ 값을 λ³€μˆ˜ division 에 ν• λ‹Ήν•©λ‹ˆλ‹€.
    5. λ‚˜λ¨Έμ§€ 연산을 μ‚¬μš©ν•˜μ—¬ num_twoλ₯Ό num_one으둜 λ‚˜λˆˆ 값을 μ°Ύκ³  λ³€μˆ˜ remainder 에 ν• λ‹Ήν•©λ‹ˆλ‹€.
    6. num_one을 num_two의 κ±°λ“­μ œκ³±μœΌλ‘œ κ³„μ‚°ν•˜κ³  κ·Έ 값을 λ³€μˆ˜ exp 에 ν• λ‹Ήν•©λ‹ˆλ‹€.
    7. num_one을 num_two둜 λ‚˜λˆ„κ³  μ†Œμˆ«κ°’μ€ 버린 μ •μˆ˜ 값을 κ΅¬ν•˜κ³  λ³€μˆ˜ floor_division 에 값을 ν• λ‹Ήν•©λ‹ˆλ‹€.
  12. μ›μ˜ λ°˜μ§€λ¦„μ€ 30λ―Έν„°μž…λ‹ˆλ‹€.
    1. μ›μ˜ 면적을 κ³„μ‚°ν•˜μ—¬ area_of_circle μ΄λΌλŠ” μ΄λ¦„μ˜ λ³€μˆ˜μ— 값을 ν• λ‹Ήν•©λ‹ˆλ‹€.
    2. μ›μ˜ λ‘˜λ ˆλ₯Ό κ³„μ‚°ν•˜μ—¬ circum_of_circum μ΄λΌλŠ” μ΄λ¦„μ˜ λ³€μˆ˜μ— 값을 ν• λ‹Ήν•©λ‹ˆλ‹€.
    3. λ°˜κ²½μ„ μ‚¬μš©μž μž…λ ₯으둜 λ°›μ•„μ„œ 면적을 κ³„μ‚°ν•©λ‹ˆλ‹€.
  13. λ‚΄μž₯ ν•¨μˆ˜ input을 μ‚¬μš©ν•˜μ—¬ μ‚¬μš©μžλ‘œλΆ€ν„° 이름, μ„±, κ΅­κ°€ 및 λ‚˜μ΄λ₯Ό μ–»κ³  ν•΄λ‹Ή λ³€μˆ˜ 이름에 값을 μ €μž₯ν•©λ‹ˆλ‹€.
  14. Python μ…Έ λ˜λŠ” νŒŒμΌμ—μ„œ help('keywords')을 μ‹€ν–‰ν•˜μ—¬ 파이썬의 reserved words λ˜λŠ” ν‚€μ›Œλ“œλ₯Ό ν™•μΈν•©λ‹ˆλ‹€.

πŸŽ‰ μΆ•ν•˜ν•©λ‹ˆλ‹€ ! πŸŽ‰

<< Day 1 | Day 3 >>