반응형

2024/10 13

진 (Jin) ‘I'll Be There’ Live Clip

진 (Jin) ‘I'll Be There’ Live Clip     https://www.youtube.com/watch?v=1RlXJJKpMSo 가사이리저리 바쁘게 산 사람들 힘든 세상 어떻게 막 살아 들 Oh oh oh (oh oh oh) Oh oh oh (oh oh oh) 작은 것보단 큰 걸 더 주는 일 그걸 위해 나는 살아가 I will be there forever 난 변하지 않아 I'll be there for you There for you Oh oh oh (oh oh oh) 네게 전할게 이 노래로 I swear that I will always sing for you Sing for you Oh oh oh I'll be there for you I'll be there for you 그저 ..

파이썬(Python) 함수(def)

파이썬(Python) 함수(def)함수(function)를 사용하면 반복되는 코드를 피하고 간결하게 작성할 수 있다. 1) 사용자 함수 정의와 호출2) 내장 함수 사용 1. 사용자 함수 정의와 호출1) 함수 기본(형식1)def 함수명([변수1, 변수2, ..., 변수n]): [return ] 예)def myFunc(x): y = 2 * x + 1 return ymyFunc(5)(결과)11def calcSum(list_data): count = 0 sum = 0 for data in list_data: count += 1 sum += data mean = sum / count return sum, meanlist_sum, list_..

파이썬(Python) 기본문법(출력문)

1. 기본출력(print)print(data_1, data_2, data_3, ..., data_n [, options]) 예)print(123, 'abc', True)print(['abc', 123, True], {'a':1, 'b':2, 'c':3})print('옵션1:')print(123)print('옵션2:',end='')print(123)print('파이썬 기본문법\n 옵션을 통한\n 문법입니다.')(결과)123 abc True['abc', 123, True] {'a': 1, 'b': 2, 'c': 3}옵션1:123옵션2:123파이썬 기본문법 옵션을 통한 문법입니다. 2. 형식 지정 출력(print.format)(형식1)print('{0} {1} {2} ... {n}'.format(data_0,..

파이썬(Python) 기본문법(제어문)

파이썬(Python) 기본문법(제어문)1. 파이썬(Python) 제어문(조건문)1.1 if문 (단일조건)if :  예)x = 65if x >= 60: print("패스")(결과)패스 1.2 if ~ else 문 (단일조건과 그외)if : else:  예)x = 85if (x >= 90): print("축하합니다.") print("합격입니다.")else: print("죄송합니다.") print("불합격입니다.")(결과)죄송합니다.불합격입니다. 1.3 if ~ elif ~ else (여러조건)if : elif : :elif : else:  예1)x = 75if (x >= 90): print('학점:A')elif (80  예2)x..

파이썬(Python) 기본문법 (기본 자료형) #2

파이썬(Python) 기본문법 (기본 자료형) #27. 딕셔너리(dict)1) 딕셔너리(dict) 생성 형식dict_data = {key1:value1, key2:value2, key3:value3, ..., key_n:value_n}또는dict_data = dict(key1=value1, key2=value2, key3=value3, ..., key_n=value_n) dict_ex1 = {1:'사과', 2:'배', 3:'복숭아', 4:'망고', 5:'파인애플'}dict_ex2 = {1:1234, 3:5678, 5:7890}dict_ex3 = {True:'맞습니다', False:'아닙니다'}dict_ex4 = {'10':['영미',24], '20':['서연',25]}> print(dict_ex1){1:..

파이썬(Python) 기본문법 (기본 자료형)

파이썬(Python) 기본문법 (기본 자료형)1. 숫자 (int, float)연산자설명예제결과a + b숫자 a에 b 더하기3 + 25a - b숫자 a에서 b 빼기3 - 21a * b숫자 a에 b 곱하기5 * 210a / b숫자 a에 b 나누기5 / 22.5a // b숫자 a를 b로 나누어 몫5 // 22a % b숫자 a를 b로 나누어 나머지5 % 21a ** b숫자 a의 b 거듭제곱3 ** 29* 연자 계산 규칙- 중복된 괄호가 있으면 안쪽 괄호부터 계산- 같은 순위의 연산은 왼쪽에서 오른쪽으로 계산- 괄호안 계산 -> 지수계산 -> 곱셈/나눗셈 계산 -> 덧셈/뺄셈 계산 2. 문자형 (str)> Print("Hello World")Hello World> type("Hello World")str> "He..

반응형