본문 바로가기
반응형

- 배움이 있는 삶115

[python] 각 자리수가 짝수인 숫자를 찾아 (,)로 구분 문제] 0 ~ 500까지의 숫자 중 각각의 자리 숫자가 짝수인 숫자를 찾아 (,)로 구분하여 나타내는 프로그램 내가 고민한 프로그램 [출력] 다른 사람 코드 결과는 동일 2020. 4. 21.
Gov. Andrew Cuomo speech about covid-19 policy to their people In a drastic step to combat the coronavirus, Gov. Andrew Cuomo ordered all non-essential workers to stay home and remain indoors as much as possible. Many people said that speech so briefly and clearly, so I like this presentation https://www.youtube.com/watch?v=MRSD6zF9b1M 2020. 4. 11.
Matt Damon's full commencement address at MIT He is so famous actor, when you watch "Ford and Ferrriy, you can see his performance, so good. When I frist that movie, I didn't know him, but When I heard this speech, I understand. His speech is so humble, and so on. I like his address. https://www.youtube.com/watch?v=DFNgoZ5-qAM 2020. 4. 11.
Andrew and Chris Cuomo Call Mom at CNN This is so funny clip, So if you have some need a interesting clip, I recommend it They are so very famous brothers, older brother is a NY governer, younder brother is cnn ancher https://www.youtube.com/watch?v=afS3WoDzo0Q 2020. 4. 11.
Steve job's 2005 Stanford commencement address https://www.youtube.com/watch?v=UF8uR6Z6KLc 2020. 4. 11.
[python] 리스트의 join() 개념 python join() : 리스트에 특정 구분자를 추가하여 문자열로 변환함 문제 ] 배수를 구하고, 콤마(,)로 구분하여 출력하라. [출력결과] 여기서 join 함수를 사용하여 r list에 , 를 함께 출력 함 예제) 철수 + 영희 + 민수 를 join을 사용하면 [출력결과] 2020. 4. 8.
[Python] 가위,바위,보 게임 문제] 두사람이 가위, 바위, 보를 하는 게임으로 가위,바위,보를 입력 받아 결과를 출력하는 프로그램임 - 이때 리스트 ["가위", "바위", "보"] 를 활용 할 것. [code] [Result] 2020. 4. 3.
[Python] 흐름제어 - if 연습문제 문제] 임의 정수를 입력 받아 모든 약수를 구하고, 약수가 2개 일때는 소수임을 나타내라 - 약수란 : 나누웠을때 나머지가 '0' 이 되는 수이다. - 소수란 : 1과 자기 자신으로만 나누어 지는 수임 따라서 소수의 count는 2 뿐이다. 2를 구하기 위하여 for문 안의 if 문에 count를 구했다. [결과] [ 다른 방법으로 푼 소스 코드] 2020. 3. 30.
[Python] int, string 문, try-except 문 처리 (Invalid값 입력 시) 상황 1. a에 입력값을 받지만, 그 a를 int로 제한 한다. float, string 입력 시 error 가 발생 한다 그래서 except 문이 처리 된다 2. 또한 int로 정의해 주지 않으면, a = 10, b = 20 입력 하면 값은 1020 으로 입력된다. 그 이유는 int로 정의하지 않고 a = input('input first value : ') 로 정의 하면, a의 값을 string으로 입력 받기 때문에 그대로 출력한다. Try except 문으로 처리 하여, invalid value 입력 시 except 문이 처리 되도록 한다. while True: try: a = int(input('input first value: ')) b = int(input('input second value:.. 2020. 3. 9.
[Python] - Pandas 함수를 이용한 머신러닝 알고리즘 연습 Error - 파일을 읽어 들이기 위해서 pd.read_excel('xxx.xlsx') 를 사용하나, --> excle 파일을 인식하지 못하는 error 가 발생함. --> 원인은 파이선 오류 로 guessing 하고 있으나, 아직 정확하진 않음 - 해결방법 : excel을 csv 파일로 변화하여 --> pd.read_csv('xxx.csv') 로 read 하여 사용 함. --- 아래는 타이타닉 database를 이용하여, csv 파일을 read 한 후 pie 챠트를 만들어 본 것임 ---- import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns sns.set() train = pd.read_c.. 2020. 3. 6.
728x90
반응형